page top功能以及根据屏幕宽度改变css
2012-02-23 17:12
351 查看
<!-- js部分 -->
<script type="text/javascript">//<![CDATA[ <!--{$tpl_javascript}--> $(function(){ <!--{$tpl_onload}--> $(document).ready( function (){ $('#pagetop').scrollFollow({ speed: 2000, offset: 400, container: 'container' }); var page = document.getElementById("pagetop"); if (window.screen.width > 1280) { page.className = "pagetopcss1"; } else { page.className = "pagetopcss"; } }); }); //]]> </script> <style type="text/css"> .pagetopcss{ margin-left:950px; } .pagetopcss1{ margin-left:1000px; }
<!-- html部分 -->
<!-- MAIN --><div id="container"><!--/ランキング--></div><!-- /MAIN -->
<div id="pagetop"><a href="#header"><img src="../img/pagetop.png" alt="pagetop" width="72" height="14"></a></div>
相关文章推荐
- 根据屏幕转向方向和屏幕宽度变化改变UITableView显示效果 屏幕旋转
- css居然有根据容器宽度自动截取长度加省略号功能,强大!!
- CSS根据屏幕分辨率宽度自动适应的办法
- css居然有根据容器宽度自动截取长度加省略号功能,强大!!
- 纯 CSS实现根据元素已知的宽度设置高度以及注意事项
- 记一道css面试题 : 三栏布局两边宽度固定,中间宽度自适应,并且布局随屏幕大小改变。
- J2ME实现展示内容自动根据屏幕宽度换行的功能
- 获取屏幕的宽度以及动态设置ImageView的宽度、高度
- 如何让网页适应所有的屏幕宽度+表格根据内容自适应
- SharePoint 2010自定Page Layout不改变core4.css加入自定义style和markup
- 根据判断PC浏览器类型和手机屏幕像素自动调用不同CSS
- less @media根据宽度判断不同屏幕手机样式
- CSS实现自适应高度布局:头部底部固定,中间自适应铺满屏幕剩余高度,中间盒子里左盒子固定右盒子自适应宽度
- button自适应宽度 并根据屏幕宽自动换行排列
- Android之屏幕方向改变以及onConfigurationChanged事件
- Visual Studio添加对Class内部的if, for循环等块区域的outline功能以及对html,css添加#region模块
- 移动端 根据屏幕宽度来等比调解高度的大小
- Flex2 数据的验证方法以及如何改变错误提示的CSS
- pc浏览器css和js计算浏览器宽度的差异以及和滚动条的关系
- CSS如何让DIV的宽度随内容的改变而改变