It is unclear from your question where the html element is on the product page that you wish to show/hide. If it is in the details.phtml template you can extend this in your module or theme at
Check for your custom attribute and apply the css class name to the html element you want to hide/show:
Once you have the extension installed you can specify an order attribute in your css XML tags.
<css src="Namespace_Module::css/custom.css" order="100"/>
You can also use the order attribute in layout XML files such as
Any css tags you don't specify an order for are treated as ...