SO中文参考
首页
(current)
程序语言
c
java
python
c++
go
javascript
swift
c#
操作系统
linux
ubuntu
centos
unix
数据库
oracle
mysql
mongodb
postgresql
框架
node.js
angular
react-native
avalon
django
twisted
hadoop
.net
移动开发
android
ios
搜索
未执行 amp-video 组件后备占位符和后备 - E...</desc> <question vote="0"> <p>放大器视频后备功能对我不起作用。在此代码中:</p> <pre><code><!doctype html> <html ⚡> <head> <meta charset="utf-8"> <title>Placeholders & fallbacks - Example 3</title> <script async src="https://cdn.ampproject.org/v0.js"></script> <script async custom-element="amp-video" src="https://cdn.ampproject.org/v0/amp-video-0.1.js"></script> <link rel="canonical" href="https://preview.amp.dev/documentation/guides-and-tutorials/develop/style_and_layout/placeholders.example.3.html"> <meta name="viewport" content="width=device-width"> <style amp-boilerplate>body{-webkit-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-moz-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-ms-animation:-amp-start 8s steps(1,end) 0s 1 normal both;animation:-amp-start 8s steps(1,end) 0s 1 normal both}@-webkit-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-moz-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-ms-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-o-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}</style><noscript><style amp-boilerplate>body{-webkit-animation:none;-moz-animation:none;-ms-animation:none;animation:none}</style></noscript> </head> <body> <amp-img width="550" height="368" layout="responsive" src="non_existent_image.jpg"> <div fallback> <p>Image not found</p> </div> </amp-img> <amp-video width="640" height="358" src="non_existent_video.mp4"> <div fallback> <p>Video not found</p> </div> </amp-video> </body> </html> </code></pre> <p>代码可以在<a href="https://playground.amp.dev/?_gl=1*14hl1ox*_ga*YW1wLVJpMFc0Z3FCVlBXRXFyS3FoQV9GOGc.*_ga_TYM9BH1XCX*MTcxNjU5NTAwNy4xMi4xLjE3MTY1OTUwMDcuMC4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ferrer">AMP Playground</a></p>中访问 <p>丢失图像的后备正确显示消息“找不到图像”,但不显示丢失视频的后备。</p> <p>上面的代码有什么问题?</p> </question> <answer tick="false" vote="0"> <p>虽然代码是按照文档写的,但是不起作用。不过,经过一段时间的尝试,这个修改成功了:</p> <pre><code><amp-video width="640" height="358" src="non_existent_video.mp4"> <div> <p>Video not found</p> </div> </amp-video> </code></pre> <p>我从 中删除了 <pre><code>fallback</code></pre> 属性,当播放器不工作时会出现该消息。</p> </answer> </body></html>
问题描述
投票:0
回答:0
image
video
error-handling
html5-video
amp-html
最新问题
有没有办法在 SVG 中嵌套按钮?
HotChocolate GrapQl Schema Stiching 返回错误代码 HC0018
Google 使用邮政信箱自动填写地址表?
Rhino Mocks 的 Arg<T>.Property
Azure 身份验证器帐户图标 - 公司徽标?
如何在 Jetpack Compose 中按固定 dp 量更改图像的对齐方式?
有关 CMake 错误的问题:没有为目标提供源
Symfony 2:如何通过路由名称获取路由默认值?
Typescript 函数返回类型错误未显示
您可以在 BigQuery 中创建临时表作为目标表吗?
Terragrunt 提供程序覆盖
Python 自动化 ant 构建
在 Python 中对大型数据集进行排序最有效的方法是什么?
Quickbook/Intuit API - 刷新令牌 (Oauth2)
node js/mongodb:在循环对象/数组时更新文档
为什么“transform:scale()”上的转换会使元素在 webkit 浏览器中变得像素化?
使用SSM推送终端命令
技术绘图的字母有帮助,我有 3 种设计,我需要逆时针放置字母
多副本表单中的公共变量
Vue 的 ref 不维护嵌套私有属性的类型
© www.soinside.com 2019 - 2024. All rights reserved.