1
我有一个CSS文件,我将输入设置为除默认值之外的其他值。如何将属性恢复为默认值?
input[type=text]{
text-align: center;
border: none;
background-color: #EBEBEB;
border-radius: 5px;
width: 100%;
padding: 12px;
margin-top: 25px;
display: inline-block;
box-sizing: border-box;
font-family: "Lucida Sans Typewriter", "Lucida Console", monaco,
"Bitstream Vera Sans Mono", monospace;
}
现在我想使用此INPUT在网页上的其他地方使用默认值。我怎样才能将它设置为默认只在网页的特定部分,而不会损坏INPUT的其余部分?
给的,而不是应用全局风格影响所有投入要素的输入一类? – Terry
给你的输入一个ID并覆盖你想要的任何样式属性。 –