.slider .ctrl 當中的bottom:-13px是什么意思,為什么前面加“ - ”符號呢?
.slider .ctrl{
width:100%;
height:13px;
line-height: 13px;
text-align: center;
position:absolute;
left:0;
bottom:-13px;
background-color: #f00;
}
我調試了一下,bottom:-13px,與bottom:13px相比,要向下移動一些距離,這是為什么,為什么要用-13px呢?
2019-01-26
具體代碼沒看到 簡單說下? ctrl是ab定位 離他最近的父元素帶定位的是slider 是re定位 所以相對這個父元素定位 botton0的話 就是和圖片重合然后最下面那條邊對齊 -13px 就是讓他向下移動自己的寬度 相當于變成了剛好上邊緣和父元素的下邊緣交接的樣子
2016-11-06
請確定父元素已設置position:relative,.slider .ctrl的position:absolute,沒看到你的具體代碼,我也很難知道問題所在
2016-08-24
這是為了將.ctrl放在.slider的下邊13px處,請看圖,應該很清楚的了