Html 如何从屏幕底部开始选取框文本?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/17387932/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How to start Marquee text start from bottom of the screen?
提问by KCRaju
Hello i am using marqueeto scroll from bottom to top.It working fine but it is starting from mid of the screen.But i need to start it from bottom.
你好,我正在使用选取框从底部滚动到顶部。它工作正常,但它是从屏幕中间开始的。但我需要从底部开始。
<!DOCTYPE html>
<html>
<body>
<body bgcolor="#2E9AFE">
<marquee bgcolor="#2E9AFE" scrollamount="2" direction="up" loop="true">
<center> <font color="#ffffff"><strong> I AM HERE<br>
Vx.0<br><br>
DEVELOPER<br>
xxxxxx<br><br>
<br> CONTACT US<br>
xxxxxx</strong></font></center></marquee>
</body>
</html>
回答by Ani Menon
Vertical Marquee using key-frames:
使用关键帧的垂直选框:
.marquee {
position: relative;
animation: marquee 2s linear infinite;
text-align:center;
color:#ffffff;
}
@keyframes marquee {
0% {
top: 10em
}
100% {
top: -2em
}
}
<body bgcolor="#2E9AFE">
<p class="marquee">
I AM HERE<br>
Vx.0<br><br>
DEVELOPER<br>
xxxxxx<br><br>
<br> CONTACT US<br>
xxxxxx
</p>
</body>
回答by jerdiggity
<!DOCTYPE html>
<html>
<body bgcolor="#2E9AFE">
<marquee style="background-color: #2E9AFE; bottom: 0; color: #ffffff; height: 100%; position: absolute; text-align: center;" scrollamount="2" direction="up" loop="true">
<strong>I AM HERE<br/>Vx.0<br/><br/>DEVELOPER<br/>xxxxxx<br/><br/><br/>CONTACT US<br/>xxxxxx</strong>
</marquee>
</body>
</html>
Please note, to my knowledge this is not valid HTML. To validate, check out http://validator.w3.org. Also, there were two body tags (instead of one) and some other HTML that wasn't properly formatted, most of which I tried to address. If you're not yet familiar with CSS, just know that it's your friend. (In other words, you'd probably be doing yourself a favor if the next thing you learned was CSS. It makes life much easier.)
请注意,据我所知,这不是有效的 HTML。要进行验证,请查看http://validator.w3.org。此外,还有两个 body 标签(而不是一个)和其他一些格式不正确的 HTML,我试图解决其中的大部分问题。如果您还不熟悉 CSS,只需知道它是您的朋友。(换句话说,如果你接下来学到的是 CSS,你可能会帮自己一个忙。它让生活变得更轻松。)
Screenshot from my computer:
我的电脑截图:
Hope that helps... :)
希望有帮助... :)