我有 2 个字段集,我需要为两者使用不同的边框颜色,并且样式需要在标题中 如何区分这两个字段集?
我只知道这个:
<style type="text/css">
fieldset {border-color:red;}
</style>
谢谢
最佳答案
您可以简单地添加类来区分它们。
html 标签
<fieldset class="set-1">
<!-- your code here -->
</fieldset>
<fieldset class="set-2">
<!-- your code here -->
</fieldset>
CSS代码
fieldset.set-1 {border-color:red;}
fieldset.set-2 {border-color:green;}
关于html - 标题中的样式,每个样式用于不同的字段集,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35053192/