将代码移动到页面底部而不影响它's在完成页面上的位置
move code to the bottom of a page without effecting it's position on the finished page
我在一个网站上工作,这个网站有一个很长的项目列表(大约200个),目前显示在页面顶部的下拉列表中。出于SEO的原因,我想把这个代码移到页面的底部,这样搜索引擎就可以忽略它,但如果有意义的话,我不想改变加载时内容在页面上显示的位置。
有没有一种非javascript的方法来做到这一点,甚至是javascript的方法?
你是说像这样
html
<div id="contents">
<p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</p>
</div>
<div id="top-items">
<p>Top Items</p>
</div>
css
#top-items {
width:100%;
float:left;
background:#333;
height:40px;
color:#FFF;
position:absolute;
top:0;
left:0;
text-align:center;
}
#contents {
width:100%;
float:left;
padding:30px 0 0 0;
}
相关文章:
- 固定位置菜单时滚动,直到它击中一个相对容器的底部
- 如何在提交事件的底部设置窗口位置
- 如何更改页眉'的底部边框颜色取决于滚动位置
- 导航栏固定底部位置,当到达滚动位置时切换到静态
- 如何在背景图像到达底部时停止背景位置更改
- 滚动到页面底部时更改背景位置
- 固定图像在 DIV 底部的位置
- 底部为0的绝对位置仅适用于高度为100%的父对象
- 如何放置填充整个屏幕但在底部某个位置停止的背景图像
- jQuery UI要设置的位置“;右“;以及“;底部“;而不是“;“左”;以及“;顶部”;
- jQuery-DIV可以滚动移动,并将位置粘贴到窗口的顶部和底部
- 如何锚定iframe视频播放器的底部,左侧和右侧的位置?HTML5和Javascript
- 根据另一个元素的渲染高度设置元素的底部位置
- 如何设置固定位置元素的高度以达到浏览器窗口的底部
- 敲除验证-配置位置(顶部或底部)量程错误
- 如何垂直增加DIV的宽度,向上即底部位置需要固定
- 将代码移动到页面底部而不影响它's在完成页面上的位置
- 页脚应保持在底部并保持在固定位置,即使浏览器调整大小也是如此
- “位置:固定;底部:0;”在iPhone中不起作用
- 将滑动潜水放置在固定的底部位置