我想这样做,以便当我从标题滚动时它停留在那里,当我向后滚动它时不必重新加载.
这是代码:
.container_12 { margin-left: auto; margin-right: auto; wIDth: 1200px; } #student_dashboard .container_12 .grID_12 { wIDth: 100%; } .container_12 .grID_12 { wIDth: 90.5%; } .grID_1,.grID_2,.grID_3,.grID_4,.grID_5,.grID_6,.grID_7,.grID_8,.grID_9,.grID_10,.grID_11,.grID_12 { display: inline; float: left; position: relative; margin-left: 15.0px; margin-right: 15.0px; } header #logo { display: inline-block; float: left; } img { vertical-align: mIDdle; display: block; float: none; margin: 0 auto; } img { border: 0; }
<body ID="student_dashboard"> <form ID="form1" runat="server"> <div ID="custom_bg"><img src='<%= Page.ResolveClIEntUrl("~/secure-image/" + IDBGImage) %>'></div> <header> <div > <div > <div ID="logo"><img src='<%= Page.ResolveClIEntUrl("~/secure-image/" + IDlogo)%>' wIDth="100" height="100"></div> <h1 ID="welcome">Welcome to <span ID="spanname" runat="server"></span> Fundraising page</h1> </div> </div> </header> <div ></div> <div ID="content"> <div > <div > <div > <div><img src='<%= Page.ResolveClIEntUrl("~/secure-image/" + IDImage)%>' /></div> <div ><span ID="spannameMain" runat="server"></span></div> <blockquote >Please help me reach my fundraising goal! Thank you so much! </blockquote> </div> <div > <div > <div > <p>Welcome to my fundraiser! Thank you for being willing to participate and help me and my team! You can see how my team is doing with our fundraising goal by checking the gauge at the bottom of this page. Remember,each dollar counts!</p> </div> </div> <div > <div > <h3>Donate</h3> <p>Make a direct donation to my fundraising account by clicking the "Donate" button below.</p> <br><br> </div> <div ID="thermo2" > <div > <div > <div > 1000000 </div> </div> <div > <div >354680 </div> </div> </div> </div> <div ID="paddingbtn"> <asp:Imagebutton ID="btnImageDonate" runat="server" ImageURL="~/Images/btndonate.png" /> </div> </div> </div> </div> </div> </div> </div> <div ></div> </form> </body>解决方法 这是一个优化问题.使用HTML中的图片标签来解决它.图片根据屏幕尺寸加载不同尺寸的图像.
<picture> <source srcset="img/hero_landscape.png" media="(max-wIDth: 480px)" /> <img src="img/hero_pc.png" alt="Default Image" wIDth="710" height="200"> </picture>
Info and examples on picture
总结以上是内存溢出为你收集整理的html – 当我在移动设备上滚动时,元素必须重新加载全部内容,希望文章能够帮你解决html – 当我在移动设备上滚动时,元素必须重新加载所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)