,对于label input布局,input 撑满是真方便.但是对于性能会不会有影响呢?
label{
width:6em;
}
input{
width:calc(100% - 6em)/*注意减号左右一定要有空格*/
}
学习笔记
- 竟然连鼠标移动都会触发css表达式进行计算
- eric meyer提到w3c规范的一条备注(评论里面的同学也有提到):
Note that the grammar requires spaces around binary ‘+’ and ‘-’ operators. The ‘*’ and ‘/’ operators do not require spaces. via [CSS3 Values and Units specification](http://www.w3.org/TR/css3-values/)
也就是说,”+”、”-“两个符号边上必须要有空格,而”*”、”/”符号则不是必须的。