-
Notifications
You must be signed in to change notification settings - Fork 869
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
supportWebp() will append a '!' #150
Labels
Comments
也遇到了这个情况! |
这样应该可以解决这个问题,稍后修复这里 function supportWebp () {
if (!inBrowser) return false
let support = true
const d = document
try {
let el = d.createElement('object')
el.style.display = 'none'
el.type = 'image/webp'
el.innerHTML = '!'
d.body.appendChild(el)
support = !el.offsetWidth
d.body.removeChild(el)
} catch (err) {
support = false
}
return support
} |
|
@lc60005457 感谢,稍后会在新版本修复这里 |
现在暂时样式里面匹配了这个元素 |
@LingF 在新版中增加了对这个webp支持检测元素的隐藏,可以不用通过增加css 解决了。https://github.com/hilongjw/vue-lazyload/blob/master/src/util.js#L111 |
@hilongjw nice |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
在没有使用 vue-ssr 的情况下,页面由 vue 进行前端渲染,会导致一开始白屏的时候,出现一个 ‘!’ 一闪而过
The text was updated successfully, but these errors were encountered: