html - 滑出面板?

标签 html css slide out tabslideout

我正在做一个小元素,我有这个面板,但我想改变“制表符”的位置,像这样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;
}


我觉得这部分有问题;

最佳答案

Demo

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/

相关文章:

html - Internet Explorer 中难看的字体呈现

css - 验证码 CSS 样式覆盖

jquery - 如何在单击按钮时向上/向下滑动隐藏的 div?

jquery - 用 animate() CSS3 替换 jQuery 幻灯片

ios - 我怎样才能让 1 viewcontroller 从底部向上滑动

javascript - jquery .next() 和 .prev() 在同一个 div 中

javascript - 在 JQuery 验证错误时更改输入类 [type=text]

javascript - 如何在 React 的嵌套组件场景中使页脚居中对齐

javascript - 如何去掉页面顶部的这些字母

javascript - 缓慢地自动滚动到 div 的底部