", "interactionStatistic": {"userInteractionCount": 1, "@type": "InteractionCounter", "interactionType": "https://schema.org/LikeAction"}, "datePublished": "2017-10-14T04:07:50Z", "@type": "Comment", "author": {"url": "https://www.v2ex.com/member/ragnaroks", "@type": "Person", "name": "ragnaroks"}}, {"text": "img 作为子元素占满父元素,不然一直就是一条直线", "datePublished": "2017-10-14T04:08:44Z", "@type": "Comment", "author": {"url": "https://www.v2ex.com/member/ragnaroks", "@type": "Person", "name": "ragnaroks"}}, {"text": "一张图片横切成多张图片,然后 js 脚本一张张延时加载?", "datePublished": "2017-10-14T05:18:15Z", "@type": "Comment", "author": {"url": "https://www.v2ex.com/member/pq", "@type": "Person", "name": "pq"}}, {"text": "@pq #6 大概不是吧,那得切多少张啊。", "datePublished": "2017-10-14T06:59:13Z", "@type": "Comment", "author": {"url": "https://www.v2ex.com/member/Explorare", "@type": "Person", "name": "Explorare"}}, {"text": "图片", "datePublished": "2017-10-14T07:54:28Z", "@type": "Comment", "author": {"url": "https://www.v2ex.com/member/CYKun", "@type": "Person", "name": "CYKun"}}, {"text": "@CYKun #8 传神 www", "datePublished": "2017-10-14T07:57:38Z", "@type": "Comment", "author": {"url": "https://www.v2ex.com/member/Explorare", "@type": "Person", "name": "Explorare"}}, {"text": "CSS3 的 transition 属性可以生成动画,只需要控制初始样式,结束样式,可选的速度曲线", "interactionStatistic": {"userInteractionCount": 1, "@type": "InteractionCounter", "interactionType": "https://schema.org/LikeAction"}, "datePublished": "2017-10-14T08:00:23Z", "@type": "Comment", "author": {"url": "https://www.v2ex.com/member/autoxbc", "@type": "Person", "name": "autoxbc"}}, {"text": "@Explorare 哈哈,误触了\n我的想法是在图片上面放一个空白元素,初始的时候空白元素完全盖住图片,然后用 css 控制空白元素的高度变化,模拟出逐行加载的效果。\n我不懂 css,随口瞎说一下,不可行不要打我", "interactionStatistic": {"userInteractionCount": 1, "@type": "InteractionCounter", "interactionType": "https://schema.org/LikeAction"}, "datePublished": "2017-10-14T08:02:34Z", "@type": "Comment", "author": {"url": "https://www.v2ex.com/member/CYKun", "@type": "Person", "name": "CYKun"}}, {"text": "如果只是简单的线性遮盖 /隐藏, 用不到 JS\nhttps://codepen.io/Caldis/pen/MEqLoW\n一个伪类套一段动画就行, 延时和持续时间都可以自定义", "interactionStatistic": {"userInteractionCount": 2, "@type": "InteractionCounter", "interactionType": "https://schema.org/LikeAction"}, "datePublished": "2017-10-14T09:24:08Z", "@type": "Comment", "author": {"url": "https://www.v2ex.com/member/cbais7890", "@type": "Person", "name": "cbais7890"}}, {"text": "我现在用纸飞机,由于其线路问题,用某些 ISP 上的时候 还能经常碰上图片逐行加载。", "datePublished": "2017-10-14T15:09:02Z", "@type": "Comment", "author": {"url": "https://www.v2ex.com/member/yksoft1", "@type": "Person", "name": "yksoft1"}}, {"text": "@yksoft1 #13 我爱国上网访问亿恒泰的时候基本每张图片都是逐行加载,大概持续 5s,每张图大约 3MB 左右。", "datePublished": "2017-10-14T15:22:58Z", "@type": "Comment", "author": {"url": "https://www.v2ex.com/member/Explorare", "@type": "Person", "name": "Explorare"}}, {"text": "@cbais7890 #12 图片中的小姐姐 叫啥名字 https://ws1.sinaimg.cn/bmiddle/62e721e4gw1et02crv7f5j200k00k0sh.jpg", "datePublished": "2017-10-15T04:44:41Z", "@type": "Comment", "author": {"url": "https://www.v2ex.com/member/fhefh", "@type": "Person", "name": "fhefh"}}], "interactionStatistic": [{"userInteractionCount": 3533, "@type": "InteractionCounter", "interactionType": "https://schema.org/ViewAction"}, {"userInteractionCount": 2, "@type": "InteractionCounter", "interactionType": "https://schema.org/LikeAction"}, {"userInteractionCount": 15, "@type": "InteractionCounter", "interactionType": "https://schema.org/ReplyAction"}], "text": "原来曾经见到过一个 js 脚本,能模拟 56K 拨号上网时因为带宽不足而导致图片逐行加载的脚本,我已经忘记是多久之前看到过的了,也再也找不到了,求助。", "datePublished": "2017-10-14T01:13:06Z", "commentCount": 15, "mainEntityOfPage": "https://www.v2ex.com/t/397512", "author": {"url": "https://www.v2ex.com/member/Explorare", "@type": "Person", "name": "Explorare"}, "headline": "求一个能模拟 '90 拨号宽带的图片逐行扫描效果的 js 脚本", "url": "https://www.v2ex.com/t/397512", "isPartOf": {"url": "https://www.v2ex.com/go/js", "@type": "WebPage", "name": "JavaScript"}, "@context": "https://schema.org", "@type": "DiscussionForumPosting"}
原来曾经见到过一个 js 脚本,能模拟 56K 拨号上网时因为带宽不足而导致图片逐行加载的脚本,我已经忘记是多久之前看到过的了,也再也找不到了,求助。
1
hzw758 2017 年 10 月 14 日
Chrome 开发人员工具里可以模拟呀
|
2
oh 2017 年 10 月 14 日 via iPhone
Chrome 可以模拟网络环境
|
4
ragnaroks 2017 年 10 月 14 日 <img id="image" src="<src>" style="width:100%;height:0;overflow:hidden;">
<script> let height=1; let i=setInterval(()=>{ document.getelementbyid('image').style.height=height+'%'; height=(height<=100)?++:height; },100); </script> |
5
ragnaroks 2017 年 10 月 14 日
img 作为子元素占满父元素,不然一直就是一条直线
|
6
pq 2017 年 10 月 14 日
一张图片横切成多张图片,然后 js 脚本一张张延时加载?
|
8
CYKun 2017 年 10 月 14 日 via Android
图片
|
10
autoxbc 2017 年 10 月 14 日 CSS3 的 transition 属性可以生成动画,只需要控制初始样式,结束样式,可选的速度曲线
|
11
CYKun 2017 年 10 月 14 日 via Android @Explorare 哈哈,误触了
我的想法是在图片上面放一个空白元素,初始的时候空白元素完全盖住图片,然后用 css 控制空白元素的高度变化,模拟出逐行加载的效果。 我不懂 css,随口瞎说一下,不可行不要打我 |
12
cbais7890 2017 年 10 月 14 日 |
13
yksoft1 2017 年 10 月 14 日
我现在用纸飞机,由于其线路问题,用某些 ISP 上的时候 还能经常碰上图片逐行加载。
|