我有这样的结构:
<div class="right"><div class="button"><a class="go-button green" href="<?php echo $checkout; ?>"><span>SHOP</span></a></div>
</div>
<div class="center"><div class="button"><a class="go-button green" href="<?php echo $continue; ?>"><span>SHOP 2</span></a></div>
</div>
CSS:
div.button {
display: inline-block;
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
border-radius: 4px;
-webkit-transition: all 0s 0;
-moz-transition: all 0s 0;
-ms-transition: all 0s 0;
-o-transition: all 0s 0;
transition: all 0s 0;
text-shadow: 0px -1px 0px #42af92;
padding: 5px 15px;
margin: 5px 0px;
color: #fff !important;
font-weight: 100;
font-style: normal;
cursor: pointer !important;
}
a.go-button {
height: 35px;
/../
这个结构是有效的。但我有这个输入:
<div class="input cf">
<input type="submit" name="reg-submit" id="reg-submit" value="Kaydı Tamamla" class="button">
</div>
并希望这种样式像以前的 div 一样。我如何在 div button
中导入/嵌入此输入?
最佳答案
你不需要。只需将样式应用于多个选择器,如下所示:
div.button, #reg-submit {
display: inline-block;
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
border-radius: 4px;
-webkit-transition: all 0s 0;
-moz-transition: all 0s 0;
-ms-transition: all 0s 0;
-o-transition: all 0s 0;
transition: all 0s 0;
text-shadow: 0px -1px 0px #42af92;
padding: 5px 15px;
margin: 5px 0px;
color: #fff !important;
font-weight: 100;
font-style: normal;
cursor: pointer !important;
}
关于html - HTML 中的输入样式,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12355968/