kon*_*vid 6 html css css3 pseudo-element css-content
所以,我在输入元素上有一个自定义样式,我想在输入上放置一些文本:after.
我遇到的问题是我似乎无法改变:after元素的字体权重,这个问题只发生在元素input和:after元素的组合上.
CSS
input[type="checkbox"] { /* enable styling of the checkbox ! */
-moz-appearance: none;
-webkit-appearance: none;
}
input { /* set up some basic styles.... */
background-color:#ccc;
width:200px;
height:200px;
background-color:grey;
}
input:after { /* and we create the :after element */
width:100%;
text-align:center;
font-weight:100; /* THIS DOESN'T WORK FOR SOME REASON */
content: "This should be thin"; /* some text */
}
Run Code Online (Sandbox Code Playgroud)
的jsfiddle
测试
Chrome for mac(最新)
题
为什么我不能在:after元素的元素集上设置font-weight input?