是否可以为不同样式的元素使用相同的类名?例如:
我假设如果我为不同的元素调用“dom”类,它不会引起冲突?
是可以的。
table.dom {
background-color: #F9FAFA;
float: right;
border-collapse: collapse;
display: inline-block;
width: 352px
}
th.dom {
background-color: #8FA4AD;
color: #fff;
font-size: .8em;
padding: 8px 0;
border: #2C3A44;
border-width: 1px;
border-style: solid;
width: 88px;
}
td.dom {
font-size: .7em;
border-color: #313841;
background-color: #F9FAFA;
border-width: 1px;
border-style: solid;
height: 30px;
}
我假设如果我为不同的元素调用“dom”类,它不会引起冲突?