小编Nic*_*ole的帖子

如何在悬停时展开div及其内容?

我正在尝试创建一个在悬停时扩展的div,但无法弄清楚如何使用div扩展内容.我尝试了一些溢出选项,但它们没有用.

.grow {
  padding: 5px 5px 5px 5px;
  border-radius:10px;
    height: 50px; 
    width: 22%; 
    margin: 5px 1% 5px 1%; 
    float: left; 
    position: relative; 
    transition:height 0.5s; 
    -webkit-transition:height 0.5s; 
    text-align: center;

}
.grow:hover {
    height: 115px; /* This is the height on hover */
}
Run Code Online (Sandbox Code Playgroud)
<div class="grow" style="background-color: #2a75a9;">
    <h2>Title</h2> <br>
    Contrary to popular belief, Lorem Ipsum is not simply random text.  It has roots in a piece of classical Latin literature
</div>
Run Code Online (Sandbox Code Playgroud)

这是JSFiddle

html css expand css3

8
推荐指数
1
解决办法
4万
查看次数

Css淡入淡出

我正在尝试制作div闪光灯,但我不希望它内部的文字闪烁,只是按钮本身.我不知道怎么能解决这个问题.我希望这有意义任何人都可以帮忙吗?

这是代码:

@-moz-keyframes blink {0%{opacity:1;} 50%{opacity:0.5;} 100%{opacity:1;}} /* Firefox */
@-webkit-keyframes blink {0%{opacity:1;} 50%{opacity:0.5;} 100%{opacity:1;}} /* Webkit */
@-ms-keyframes blink {0%{opacity:1;} 50%{opacity:0.5;} 100%{opacity:1;}} /* IE */
@keyframes blink {0%{opacity:1;} 50%{opacity:0.5;} 100%{opacity:1;}} /* Opera */

.download {
    background-color: red;
    padding: 15px 15px 15px 15px;
    text-align:center;
    margin-bottom: 4px;
    font-size: 24px;
    border-radius: 5px;
    -moz-transition:all 0.5s ease-in-out;
    -webkit-transition:all 0.5s ease-in-out;
    -o-transition:all 0.5s ease-in-out;
    -ms-transition:all 0.5s ease-in-out;
    transition:all 0.5s ease-in-out; 
    -moz-animation:blink normal 1.5s infinite ease-in-out; /* Firefox */
    -webkit-animation:blink normal 1.5s infinite ease-in-out; /* Webkit …
Run Code Online (Sandbox Code Playgroud)

css blink

5
推荐指数
2
解决办法
2万
查看次数

标签 统计

css ×2

blink ×1

css3 ×1

expand ×1

html ×1