[英]Image Glitch when refresh the page
When I refresh my page, I can see the image glitch.当我刷新页面时,我可以看到图像故障。
#HTML #HTML
<img id="profileIcon" class="img-circle" src="/assets/be/img/norden/6.JPG?q=0.13941100 1614531096" alt="Forest" style="border: 4px solid rgb(0, 255, 92); cursor: url("https://i.imgur.com/T2QWx7Z.png"), auto;">
How can I avoid that?我怎样才能避免这种情况? Should I look into using jQuery animation?
我应该考虑使用 jQuery animation 吗? What causes it to glitch?
是什么导致它出现故障? and How can I prevent it?
我该如何预防? I just want to make a smooth transition refresh.. and hoping that my DOMs are rendering nicely.
我只想进行平滑的过渡刷新……并希望我的 DOM 渲染得很好。
Please advise.请指教。
https://www.bunlongheng.com/norden?code=rithys4k https://www.bunlongheng.com/norden?code=rithys4k
Instead of giving border to image directly, wrap img
tag with div
and assign width
, height
and border
properties to the div
.不用直接给图像添加边框,而是用
div
包裹img
标签并将width
、 height
和border
属性分配给div
。 For the img
tag, give max-width:100%
.对于
img
标签,给出max-width:100%
。 Give alt
attribute to show placeholder until the image is loaded.给
alt
属性以显示占位符,直到加载图像。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.