Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有Number一个宽度为 100px 的类样式。我有很多应用了这个类的输入元素;但我想要一个 140 像素。我不想定义一个只应用于一个元素的新类。
Number
你可以毫无问题地做到这一点。
参见jsfiddle.net/DtG5X/
<style> .number { width : 100px; } </style> <input class="number" /><br /> <input class="number" /><br /> <input class="number" /><br /> <input class="number" style="width:140px;"/><br />