active的tab项,要指定他的border-top, 如: border-top: 1px solid #fff; border-bottom: none; margin-bottom: -1px; background: #fff;
在实现tab的时候,margin-bottom:-1px无效的问题 active的tab项,要指定他的border-top, 如: border-top: 1px solid #fff; border-bottom: none; margin-bottom: -1px; background: #fff; __EOF__ 本文作者: Jia 本文链接: https://www.cnblogs.com/zsnhweb/p/17854826.html 关于博主: 评论和私信会...
上面的一张是去掉margin-bottom:-1px;的样式;
原意是这样的:要求每个li下面都有一个虚线作为分割线,统一设置li的border-bottom后,最后一个li地下也会有虚线。(可以将源代码运行一下更清楚)现在我是想看看不用单独设置li:last-child的方法,有咩有直接用margin负值的方式解决~ 2016-10-16 回复 有任何疑惑可以回复我~ 举报 0/150 提交 取消CSS深入理解之paddi...
5rem; display: inline-block; line-height: .5rem; text-align: center; } #nav ul li.active { color: #0099FF; border-bottom: 1px solid #0099FF; margin-bottom: -1px; } csscss3 有用关注2收藏 回复 阅读6.2k muroujue: 试试margin-top:-1px 回复2017-03-17 ...
在CSS里,有很多属性都有组合写法和简写,比如Margin这个属性的组合写法是将margin-top,margin-left,margin-right,margin-bottom是个属性组合使用。而简写是将四种属性合并到一起,变成 margin:1px 2px 3px 4px。虽然很简练,但你需要记住这四个...
.weblink{ margin-right: 32px; } .weblink li{ float: right; border-left: 1px solid #bcbec3; text-align: center; width: 70px; margin-top: 127px; /*border: 1px solid black;*/ } .weblink a{ display: block; /*border: 1px solid red;*/ } 为何设置“margin-top: 127px;”时可以...
margin: top right bottom left;可以一次设置所有四个方向的外边距,它们分别对应上、右、下、左。长写...
.box0 { margin-bottom: 1em; height: 3em; } .box1 { margin-bottom: -1.5em; height: 4em; } .box2 { border: 1px dashed black; border-width: 1px 0; margin-bottom: 2em; } Some definitions for container and divs so margins' effects can be seen more clearly cssCopy to Clipboardpl...
如果想让图标距离下面30px,可以让父类padding-bottom:30px