在CSS中制作扩展选项卡有多难?

时间:2014-02-01 22:28:10

标签: html css tabs

我正在为大学创建一个网站,我想知道在网站一侧制作扩展标签会有多难?因此,当用户将鼠标悬停在标签上时,它会展开,并且可以查看更多信息。

有点像这样:

enter image description here

提前致谢!

1 个答案:

答案 0 :(得分:1)

另一位用户有一个非常好的答案同样的问题。此答案提供了来自该答案的完整示例代码:

http://jsfiddle.net/Bq6eK/13/

但你想知道的关键是这是你需要的基本CSS代码(从jsfiddle复制):

transition: height 2s;
-moz-transition: height 2s; /* Firefox 4 */
-webkit-transition: height 2s; /* Safari and Chrome */
-o-transition: height 2s; /* Opera */

SOURCE(其他用户的问题): Add CSS3 transition expand/collapse