Home  >  Article  >  Web Front-end  >  Is it standard to use multiple styles for one tag? _html/css_WEB-ITnose

Is it standard to use multiple styles for one tag? _html/css_WEB-ITnose

WBOY
WBOYOriginal
2016-06-24 12:12:491106browse

I just tried it and it seems to work. If it is not standard, I need to use many divs, all of which are the same except for the background color. How should I make them conform to the standard?

The same properties seem to be overridden according to the order in the css file.


Reply to discussion (solution)

Refer to w3cschool
http://w3schools.com/html/default.asp

This does not violate

Do not use non-standard sticky notes and css attributes in the page

It is compliant, just separate multiple attributes with spaces

.a {}
.b {}


div class="a b"
That’s it, no problem.

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn