1. 程式人生 > >input輸入框樣式寫法

input輸入框樣式寫法

<div class="cells"><div class="tb-metatit-num">
    <span role="button" class="number__decrease decreasel" @click="minu(item)"><i class="el-icon-minus"></i></span>
    <span role="button" class="number__increase decreaser" @click="addN(item)"><i class="el-icon-plus"
></i></span> <div class="input--mini"> <input type="number" :value="item.num" @input='setNum($event.target,item)' @blur="reset($event.target,item)" onkeyup="value=value.replace(/[^\d]/g,'')" onbeforepaste="clipboardData.setData('text',clipboardData.getData('text').replace(/[^\d]/g,''))"
> </div> </div> </div>
.cells{
  .tb-metatit-num{
    position: relative;
width:158px;
height:30px;
.decreasel{
      left: 0;
position: absolute;
text-align: -webkit-center;
background: #efefef;
width: 50px;
height:30px;
line-height: 30px;
color: #000;
font-size: 12px;
cursor: pointer
; top: 1px; } .decreaser{ position: absolute; text-align: -webkit-center; background: #efefef; width: 50px; height:30px; line-height: 30px; color: #000; font-size: 12px; cursor: pointer; right:0; top: 1px; } .input--mini{ height: 30px; line-height: 30px; input{ width:100%; height:30px; line-height: 30px; font-size: 14px; padding: 0 55px; text-align: -webkit-center; border: 1px solid #efefef; } } } }