滚动广告+CSS布局_html/css_WEB-ITnose

php中文网
发布: 2016-06-24 11:39:03
原创
1648人浏览过

研究了一下css布局以及css固定窗口,在此基础上设计了滚动广告。

先附上代码:(使用jquery-1.7-min)

<html><head><title>CSS布局及滚动广告</title><style>#my_windows{margin-left:2%;margin-top:20%;width:6%;height:20%;position:fixed;background-color:yellow;}#container{width:80%;height:200%;margin:0 auto;/*设置整个容器在浏览器中水平居中*/background-color:yellow;}#header{height:20%;background-color:blue;}#content{height:60%;background:#0FF;margin-top:20px;}#content_left{height:80%;width:25%;margin:3%;background:#90C;float:left;}#content_right{height:80%;width:63%;margin:3%;background:#90C;float:left;}#Footer{    height:16%;    background:#90C;    margin-top:20px;}.clear{clear:both;}</style><script type="text/javascript" src="jquery-1.7.1.min.js"></script><script>$(document).ready(function(){    $("#adds").css({"margin-top":"140px"});    setInterval("manytime()",2000);});function manytime(){    var mytest=$("#adds");    mytest.show();    mytest.css({"margin-top":"140px"});    mytest.animate({"margin-top":"0px"},1000,function(){mytest.hide()});}</script></head><body><div id="my_windows"><p id="adds">广告</p></div><div id="container">    <div id="header">头部    </div>        <div id="content">    <div id="content_left">左侧</div>    <div id="content_right">右侧</div>    </div>        <div class="Clear"></div>    <div id="footer">脚本</div></div></body></html>
登录后复制

感谢博文  http://www.kwstu.com/ArticleView/divcss_2013929173533658 的CSS布局技术支持

AiPPT模板广场
AiPPT模板广场

AiPPT模板广场-PPT模板-word文档模板-excel表格模板

AiPPT模板广场 147
查看详情 AiPPT模板广场

HTML速学教程(入门课程)
HTML速学教程(入门课程)

HTML怎么学习?HTML怎么入门?HTML在哪学?HTML怎么学才快?不用担心,这里为大家提供了HTML速学教程(入门课程),有需要的小伙伴保存下载就能学习啦!

下载
来源:php中文网
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn
最新问题
开源免费商场系统广告
热门教程
更多>
最新下载
更多>
网站特效
网站源码
网站素材
前端模板
关于我们 免责申明 举报中心 意见反馈 讲师合作 广告合作 最新更新 English
php中文网:公益在线php培训,帮助PHP学习者快速成长!
关注服务号 技术交流群
PHP中文网订阅号
每天精选资源文章推送
PHP中文网APP
随时随地碎片化学习

Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号