Css 鼠标悬停时增加边界值
当鼠标悬停在这个css规则上时,我如何让我的寄宿生增大尺寸Css 鼠标悬停时增加边界值,css,Css,当鼠标悬停在这个css规则上时,我如何让我的寄宿生增大尺寸 .script_list > div:first-child, .script_list > div.ui-sortable-helper { border-width: 1px; -webkit-border-top-left-radius: 10px; -webkit-border-top-right-radius: 10px; -moz-border-radius-topleft: 10px; -m
.script_list > div:first-child,
.script_list > div.ui-sortable-helper {
border-width: 1px;
-webkit-border-top-left-radius: 10px;
-webkit-border-top-right-radius: 10px;
-moz-border-radius-topleft: 10px;
-moz-border-radius-topright: 10px;
border-top-left-radius: 10px;
border-top-right-radius: 10px;
}
只需使用
:hover
后缀:
.script_list > div:first-child:hover,
.script_list > div.ui-sortable-helper:hover {
border-width: 2px;
}
这是一个基本的问题
基本CSS非常简单,使用:hover
状态。使用框大小调整
属性确保框的整体大小(以及随后的布局)不会受到影响,如果这不是所需的效果
CSS
.frame {
border: 1px solid black;
height: 200px;
width: 200px;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
-ms-box-sizing: border-box;
box-sizing: border-box;
}
.frame:hover {
border-width: 10px;
}
HTML
<div class="frame"></div>
事实上,如果你想保持布局,框大小调整部分是至关重要的。事实上@Harsh,这是一个更好的表达方式。