这是我的JSFiddle https://jsfiddle.net/xdmns7e4/
HTML:
<!-- Stream starting soon alert popup -->
<div class="streamStartingSoon" id="infor">
<font color="white"><strong>Stream will begin shortly!</strong></font>
</div>CSS:
.streamStartingSoon{
width: 250px;
height: 30px;
background-color: #65d1d4;
opacity:0.9;
text-align: center;
vertical-align: middle;
line-height: 30px;
position: absolute;
top: 250px;JS:
jQuery("#infor").delay(4000).fadeOut("slow");我似乎不能让这些代码集中在我的网站上...有什么想法吗?
发布于 2016-08-19 05:30:12
从CSS中删除"position: absolute;“并添加Center标签
HTML
<!-- Stream starting soon alert popup -->
<div class="streamStartingSoon" id="infor">
<center><font color="white"><strong>Stream will begin shortly!</strong</font></center>
</div>CSS
.streamStartingSoon{
width: 250px;
height: 30px;
background-color: #65d1d4;
opacity:0.9;
text-align: center;
vertical-align: middle;
line-height: 30px;
/*position: absolute;*/
top: 250px;}https://stackoverflow.com/questions/39027734
复制相似问题