我正在尝试创建一个CSS转换,其中border-bottom of a href元素在:hover上扩展到链接的宽度。
我能找到的是一个CSS解决方案,其中background width是动画的:。
但这不是我想要的,因为单击导航选项卡后,我想离开边框。因此,我必须直接动画边框,而不是背景。
<!-- assume the border-bottom is only applied to an active=clicked navigation tab -->
<h1 style="border-bottom: 3px solid green;">CS
/* CSS used here will be applied after bootstrap.css */
body{
background-color:yellow;
}
img{
-webkit-transition: all 0.5s ease;
-moz-transition: all 0.5s ease;
-o-transition: all 0.5s ease;
-ms-transition: all 0.5s ease;
transition: all 0.5s ease;
}
img:hover{
-web