Nav*_*r V 3 html css label input hover
HTML:
<fieldset>
<legend> XXX </legend>
<label for="photo"> Photo </label>
<input type="file" name="photo" id="photo">
<br>
<label for="imagePreview"> Preview: </label>
<img id="preview">
</fieldset>
CSS:
// 1. In this order, only input:hover works.
label:hover { font-size: 25px;}
input:hover { font-size: 20px;}
// 2. In this order, only label:hover works.
input:hover { font-size: 20px;}
label:hover { font-size: 25px;}
Run Code Online (Sandbox Code Playgroud)
我被要求做这两件事都应该调整它们的字体大小。
例如:将鼠标悬停在标签上,应该更改其字体大小。将鼠标悬停在输入上,也应该更改其字体大小。
为什么不同时改变字体大小呢?我怎样才能实现它?
fieldset { font-size: 20px;}
label:hover , input:hover { font-size: 25px;}Run Code Online (Sandbox Code Playgroud)
<fieldset>
<legend> XXX </legend>
<label for="photo"> Photo </label>
<input type="file" name="photo" id="photo">
<br>
<label for="imagePreview"> Preview: </label>
<img id="preview">
</fieldset>Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
10222 次 |
| 最近记录: |