HTML字幕或滑块 [英] Html Marquee or slider
本文介绍了HTML字幕或滑块的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何使图像从顶部滑到html页面并在距离不远的地方停下来.
我不需要连续的字幕..但是要使图像从顶部开始并停止在此.
how to make image slide from top to html page and stop it there at some little distance.
i dont need a continuous marquee.. but make image to come from top and make it stop there
推荐答案
尝试一下.我认为这就是您想要做的.
Try this. i think this is what you want to do.
<html>
<head>
<style type="text/css">
#menu {
position: fixed; /* to fixed postion */
left: 0; /* margin right to zero */
top: 50%; /* center of the screen */
width: 8em;
margin: -2.5em 0 0 0;
z-index: 5; /* top of the all element of the page */
background: hsla(80, 90%, 40%, 0.7);
color: white;
border: solid hsla(80, 90%, 40%, 0.5);
box-shadow: 0 1px 3px black;
border-radius: 0.5em 3em 3em 0.5em;
}
#menu li { margin: 0 }
#menu a { color: inherit }
/* Make menu absolute, not fixed, on IE 5 & 6 */
#menu { position: absolute }
*>#menu { position: fixed }
</style>
</head>
<body>
<ul id="menu">
<li><a href="#">Section 1</a>
<li><a href="#">Section 2</a>
<li><a href="#">Section 3</a>
</li></li></li></ul>
<h1 style="background: hsla(12, 20%, 20%, 0.7); color:white">Scroll Down Yaar!! :-)</h1><br /><br /><br /><br /><br /><br />
<h1 style="background: hsla(212, 20%, 20%, 0.7); color:white">Scroll Down Yaar!! :-)</h1><br /><br /><br /><br /><br /><br />
<h1 style="background: hsla(121, 40%, 20%, 0.7); color:white">Scroll Down Yaar!! :-)</h1><br /><br /><br /><br /><br /><br />
<h1 style="background: hsla(12, 20%, 20%, 0.7); color:white">Scroll Down Yaar!! :-)</h1><br /><br /><br /><br /><br /><br />
<h1 style="background: hsla(212, 20%, 20%, 0.7); color:white">Scroll Down Yaar!! :-)</h1><br /><br /><br /><br /><br /><br />
<h1 style="background: hsla(121, 40%, 20%, 0.7); color:white">Scroll Down Yaar!! :-)</h1><br /><br /><br /><br /><br /><br />
</body>
</html>
这篇关于HTML字幕或滑块的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文