目前,我有以下代码:CSS类被称为,但没有效果
<html>
<head>
<style>
.gr {
color: "#ffffff";
background: "#00ff00";
border-radius: 8px 0 0 15px;
}
.or {
color: "#00ff00";
background: "#ffa500";
border-radius: 0 15px 8px 0;
}
</style>
</head>
<body>
<span class="gr">test1</span><span class="or">test2</span><br>
</body>
</html>
但类没有在所有的任何影响。即使我调用外部样式表,它仍然是这种方式。 但,如果我做<span style="color:#ffffff;background:#00ff00;border-radius:8px 0 0 15px">
那么它的工作原理。谁能帮我这个?
在大多数情况下,要避免使用!尽可能检查这个链接:http:// stackoverflow。com/questions/3427766/should-i-avoid-using-important-in-css – dhershman
感谢您的加入! ;)我知道,但我认为@accidentalbrine是一个新的周围!只是试图通过观看规则来帮助他发现他的问题!也许更好的解决办法是制定更有限制的规则,而不是重要的!谢谢!!! –
我同意有时候确定使用时的问题很重要......但请注意,它应该在分号之前,而不是在之后(即#ffffff!important;) – deebs