html - HTML 中的输入样式

标签 html css input label

我有这样的结构:

<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/

相关文章:

jquery - 将关闭图标添加到固定到特定位置的模态弹出窗口

javascript - 选择渲染中的 Select2 模板化 <span>text</span>

html - 使用 css 删除 <span> 后的斜线

html - Internet Explorer 破坏了我的链接和 Logo

css - 将字体堆栈从 SCSS 迁移到 JSS (cssinjs)

jquery - 如何处理特定于设备的花式框或对话框宽度?

css - 我的简单格式输入区域中的光标不在左上角

PHP 从用户输入中删除 html 和 php 代码

javascript - 强制文本区域输入以默认文本开头

HTML5 : What is the max number of files that can be selected on &lt;input type ="file"/>