【问题标题】:Input style in HTMLHTML 中的输入样式
【发布时间】:2012-09-10 16:39:30
【问题描述】:

我有这个结构:

<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 中导入/嵌入此输入?

【问题讨论】:

    标签: html css input label


    【解决方案1】:

    你不需要。只需将样式应用于多个选择器,如下所示:

    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;
    
    }
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2011-03-17
      • 2014-04-07
      • 2019-03-23
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多