日期选择器,type= “date”,H5 for=id,点击后和输入框效果相同,
<label for="time">选择时间</label><input type="date" name="time" style="" id="time">
给元素设置属性值
$('.emao').attr('style','margin-left:100px');$('.emao')[0].classList.add('dem');$('.emao').classList.toggle('dem');
$('.emao').prop("style", "color:green");$('.emao').removeProp("style", "color:green");
input控件box-sizing: border-box;去掉ios的多余边框
input placeholder向上飘的治理方法input::-webkit-input-placeholder{
padding-top: 2px;
line-height: .28rem ;
}
input输入框的line-height 需要设置成normal 而不能设置成等于高度height,否则就会出现placeholder不垂直居中的问题。
input{
line-height:normal
}
-----------------
ios文字对不齐padding-top: (X-y)/2;height:字体高度;font-size:x;+上边的placeholder
去掉vue网络返回前默认的数据条目
css:[v-cloak]{
display: none;
}
html,需要隐藏的item增加v-cloak :<div class="good" v-for="item in items" v-cloak>
ios下,on('click',不响应
使用了$('.goodsorder-couple').on('touchstart',function(e){
e.stopPropagation();
仍然不好使,后发现是js执行被中断了,故而js要try{}catch{}