站长资源网页制作

html让局部强制出现滚动条不破坏整体的样式和布局

整理:jimmy2024/12/23浏览2
简介先贴出效果图: 局部出现滚动条,这样就不会破坏整体的样式和布局了. 范例代码: 复制代码代码如下: html页面内加横</div> <div class="news_infos"><div id="MyContent"><strong>先贴出效果图:</strong> <br><a href="javascript:;" onclick="showimg('/UploadFiles/2021-03-30/20131018163919.gif?2013918163952');"><img src="/UploadFiles/2021-03-30/20131018163919.gif?2013918163952" alt="html让局部强制出现滚动条不破坏整体的样式和布局" onmousewheel="return bbimg(this)" onload="javascript:resizepic(this)" border="0"/></a> <br>局部出现滚动条,这样就不会破坏整体的样式和布局了. <br><br><strong>范例代码: <br></strong><br><u>复制代码</u>代码如下: <br><html> <br><head> <br><meta http-equiv="Content-Type" content="text/html; charset=gb2312"> <br><title>html页面内加横向滚动条</title> <br></head> <br><body> <br><DIV style=" OVERFLOW-X: scroll; scrollbar-face-color:#B3DDF7;scrollbar-shadow-color:#B3DDF7;scrollbar-highlight-color:#B3DDF7;scrollbar-3dlight-color:#EBEBE4;scrollbar-darkshadow-color:#EBEBE4;scrollbar-track-color:#F4F4F0;scrollbar-arrow-color:#000000; width:752px;HEIGHT: 380px" align=center> <br><table width="1440" border="0" cellspacing="0" cellpadding="0"> <br><tr> <br><td>p</td> <br><td>&nbsp;</td> <br><td>&nbsp;</td> <br><td>&nbsp;</td> <br><td>&nbsp;</td> <br></tr> <br><tr> <br><td>&nbsp;</td> <br><td>pppppppppppppppppp</td> <br><td>ppppppppppppp</td> <br><td>ppppppppppppppppppp</td> <br><td>ppppppppppppppppppppppppppppppp</td> <br></tr> <br><tr> <br><td>&nbsp;</td> <br><td>&nbsp;</td> <br><td>&nbsp;</td> <br><td>&nbsp;</td> <br><td>&nbsp;</td> <br></tr> <br></table> <br></div> <br></body> <br></html> <br><br>拷贝上面代码到 文本文档, 修改文本后缀名,txt 为 .html 预览效果</div> </div> </div> <div class="share"> </div> <div class="nextinfo"> <p>上一篇:<a href="http://m.bwabc.com/show/1/67754.html" title="html的基本使用包括链接、样式表、span和div等等">html的基本使用包括链接、样式表、span和div等等</a></p> <p>下一篇:<a href="http://m.bwabc.com/show/1/67756.html" title="html中的javascript 全选/取消全选操作示例代码">html中的javascript 全选/取消全选操作示例代码</a></p> </div> <div class="otherlink"> <h2>最新资源</h2> <ul> <li><a href="/show/1/622578.html" title="群星《奔赴!万人现场 第2期》[FLAC/分轨]">群星《奔赴!万人现场 第2期》[FLAC/分轨]</a></li> <li><a href="/show/1/622577.html" title="群星《奇妙浪一夏 (上海迪士尼度假区音乐">群星《奇妙浪一夏 (上海迪士尼度假区音乐</a></li> <li><a href="/show/1/622576.html" title="群星《奇妙浪一夏 (上海迪士尼度假区音乐">群星《奇妙浪一夏 (上海迪士尼度假区音乐</a></li> <li><a href="/show/1/622575.html" title="【古典音乐】詹姆斯·高威《季节》1993[WA">【古典音乐】詹姆斯·高威《季节》1993[WA</a></li> <li><a href="/show/1/622574.html" title="贝拉芳蒂《卡里普索之王》SACD[WAV+CUE]">贝拉芳蒂《卡里普索之王》SACD[WAV+CUE]</a></li> <li><a href="/show/1/622573.html" title="小骆驼-《草原狼2(蓝光CD)》[原抓WAV+CUE">小骆驼-《草原狼2(蓝光CD)》[原抓WAV+CUE</a></li> <li><a href="/show/1/622572.html" title="群星《欢迎来到我身边 电影原声专辑》[32">群星《欢迎来到我身边 电影原声专辑》[32</a></li> <li><a href="/show/1/622571.html" title="群星《欢迎来到我身边 电影原声专辑》[FL">群星《欢迎来到我身边 电影原声专辑》[FL</a></li> <li><a href="/show/1/622570.html" title="雷婷《梦里蓝天HQⅡ》 2023头版限量编号低">雷婷《梦里蓝天HQⅡ》 2023头版限量编号低</a></li> <li><a href="/show/1/622569.html" title="群星《2024好听新歌42》AI调整音效【WAV分">群星《2024好听新歌42》AI调整音效【WAV分</a></li> </ul> </div> </div> <div class="sidebar"> <div class="cloud"><h2 class="hometitle">标签云</h2><ul><a href="/search.asp?key=1080P高清&m=1">1080P高清<span>(5)</span></a><a href="/search.asp?key=高清电影&m=1">高清电影<span>(5)</span></a><a href="/search.asp?key=百度云盘&m=1">百度云盘<span>(5)</span></a><a href="/search.asp?key=网盘下载&m=1">网盘下载<span>(4)</span></a><a href="/search.asp?key=破解软件&m=1">破解软件<span>(4)</span></a><a href="/search.asp?key=绿色软件&m=1">绿色软件<span>(4)</span></a><a href="/search.asp?key=磁力链接&m=1">磁力链接<span>(3)</span></a><a href="/search.asp?key=强度天梯&m=1">强度天梯<span>(3)</span></a><a href="/search.asp?key=福利资源&m=1">福利资源<span>(2)</span></a><a href="/search.asp?key=王者荣耀&m=1">王者荣耀<span>(2)</span></a><a href="/search.asp?key=黑钻活动&m=1">黑钻活动<span>(2)</span></a><a href="/search.asp?key=WPS会员&m=1">WPS会员<span>(2)</span></a><a href="/search.asp?key=刷图排行&m=1">刷图排行<span>(1)</span></a><a href="/search.asp?key=网盘限速&m=1">网盘限速<span>(1)</span></a><a href="/search.asp?key=鬼灭之刃&m=1">鬼灭之刃<span>(1)</span></a><a href="/search.asp?key=免费韩国漫画&m=1">免费韩国漫画<span>(1)</span></a><a href="/search.asp?key=宫本重做&m=1">宫本重做<span>(1)</span></a><a href="/search.asp?key=免费动漫&m=1">免费动漫<span>(1)</span></a></ul></div> </div> </article> <footer> <p>友情链接:<a href="http://www.imxmx.com/" title="杰晶网络" target="_blank">杰晶网络</a> <a href="http://www.ddrfans.com/" title="DDR爱好者之家" target="_blank">DDR爱好者之家</a> <a href="http://www.nqxw.com/" title="南强小屋" target="_blank">南强小屋</a> <a href="http://www.paidiu.com/" title="黑松山资源网" target="_blank">黑松山资源网</a> <a href="http://www.dyhadc.com/" title="白云城资源网" target="_blank">白云城资源网</a> <a href="/sitemap.xml">SiteMap</a></p> <p>Design by <a href="http://m.bwabc.com">凤求凰客栈</a> <a href="/">http://m.bwabc.com</a></p> </footer> <script src="/images/nav.js"></script> <script type="text/javascript"> jQuery.noConflict(); jQuery(function() { var elm = jQuery('#left_flow2'); var startPos = jQuery(elm).offset().top; jQuery.event.add(window, "scroll", function() { var p = jQuery(window).scrollTop(); jQuery(elm).css('position', ((p) > startPos) ? 'fixed' : ''); jQuery(elm).css('top', ((p) > startPos) ? '0' : ''); }); }); </script> </body> </html>