【发布时间】:2018-03-10 15:08:57
【问题描述】:
我的网页有一个按钮,可将用户带到页面的下一部分。我想在移动视图中隐藏该按钮,但我无法为它找出正确的 CSS。
JSFIDDLE 代码:
https://jsfiddle.net/cgqme8xo/1/#&togetherjs=qTV1soRSqs
HTML代码:
<section>
<a href="#main" class="scroll-down" address="true" class="text-right hidden-md"></a>
</section>
CSS:
.scroll-down {
opacity: 1;
-webkit-transition: all .5s ease-in 3s;
transition: all .5s ease-in 3s;
}
.scroll-down {
position: absolute;
bottom: 30px;
left: 50%;
margin-left: -16px;
display: block;
width: 32px;
height: 32px;
border: 2px solid #EF4043;
background-size: 14px auto;
border-radius: 50%;
z-index: 2;
-webkit-animation: bounce 2s infinite 2s;
animation: bounce 2s infinite 2s;
-webkit-transition: all .2s ease-in;
transition: all .2s ease-in;
}
.scroll-down:before {
position: absolute;
top: calc(50% - 8px);
left: calc(50% - 6px);
transform: rotate(-45deg);
display: block;
width: 12px;
height: 12px;
content: "";
border: 2px solid #EF4043;
border-width: 0px 0 2px 2px;
}
【问题讨论】:
-
您正在使用引导程序。您不需要自定义 CSS。请参阅下面的答案。
标签: html css twitter-bootstrap responsive-design media-queries