我正在做一个小元素,我有这个面板,但我想改变“制表符”的位置,像这样http://s26.postimg.org/5tr23ln9l/little_text.png
希望你能帮助我,亲爱的,我在这里有点“新手”~
http://jsfiddle.net/2YhzT/
#purple {
-webkit-border-radius: 4px;-moz-border-radius: 4px;border-radius: 4px;
text-align: center;
font-size: 11px;
position:fixed;
left:-50px;
-webkit-transition: all .5s ease-in-out;
-moz-transition: all .5s ease-in-out;
-o-transition: all .5s ease-in-out;
x-index:999;
}
我觉得这部分有问题;
最佳答案
CSS
#purple {
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
border-radius: 4px;
text-align: center;
position:fixed;
height:10px;
left:-50px;
-webkit-transition: all .5s ease-in-out;
-moz-transition: all .5s ease-in-out;
-o-transition: all .5s ease-in-out;
x-index:999;
}
#purple:hover {
left:0px;
}
#purple:hover > div {
display: inline-block;
}
#red {
font-size: 11px;
background: #FEFEFE;
border:1px solid;
border-left:none;
padding:5px 0 5px 0;
width:100px;
height:10px;
x-index: 50;
}
#redtab {
-webkit-border-bottom-right-radius: 4px;
-webkit-border-bottom-left-radius: 0px;
-moz-border-radius-bottomright: 4px;
-moz-border-radius-bottomleft: 0px;
border-bottom-right-radius: 4px;
border-top-right-radius: 4px;
border-bottom-left-radius:0px;
border:1px solid;
border-left:none;
text-align: center;
height:10px;
padding:5px 0 5px 0;
width:25px;
font-size: 11px;
}
或者这个 Demo 根据你的图片示例
CSS
#purple {
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
border-radius: 4px;
text-align: center;
position:fixed;
height:10px;
}
#purple:hover > div {
display: inline-block;
}
#red {
font-size: 11px;
background: #FEFEFE;
border:1px solid;
border-left:none;
padding:5px 0 5px 0;
width:100px;
height:10px;
x-index: 50;
}
#redtab {
-webkit-border-bottom-right-radius: 4px;
-webkit-border-bottom-left-radius: 0px;
-moz-border-radius-bottomright: 4px;
-moz-border-radius-bottomleft: 0px;
border-bottom-right-radius: 4px;
border-top-right-radius: 4px;
border-bottom-left-radius:0px;
border:1px solid;
border-left:none;
text-align: center;
height:10px;
padding:5px 0 5px 0;
width:25px;
font-size: 11px;
}
关于html - 滑出面板?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24105918/