google-chrome -
问题描述
出于某种原因,音频元素(附在下面)出现在 Edge 中,但没有出现在 Chrome 中。我试过添加和删除控件。下面代码中的音频元素位于最底部。我添加了其中两个只是为了看看它是否有所作为,它们都出现在 Edge 中,但没有出现在 Chrome 中。我就是想不通。我的 Chrome 浏览器是版本 70.0.3538.77。感谢您阅读本文!
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Hello Bulma!</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bulma/0.7.2/css/bulma.min.css">
<script defer src="https://use.fontawesome.com/releases/v5.3.1/js/all.js"></script>
<link rel="stylesheet" href="./helper.css">
</head>
<body>
<section class="hero is-primary">
<!-- Hero head: will stick at the top -->
<div class="hero-head">
<header class="navbar">
<div class="container">
<div class="navbar-brand">
<a class="navbar-item">
<span class="title">NAVARO</span>
</a>
</div>
<div id="navbarMenuHeroC" class="navbar-menu">
<div class="navbar-end">
<a class="navbar-item">
Home
</a>
<a class="navbar-item">
Albums
</a>
<a class="navbar-item">
Concerts
</a>
<span class="navbar-item">
<a class="button is-primary is-inverted">
<span class="icon">
<i class="fas fa-headphones-alt"></i>
</span>
<span>Listen</span>
</a>
</span>
</div>
</div>
</div>
</header>
</div>
<!-- Hero content: will be in the middle -->
<div class="hero-body">
<div class="container has-text-centered">
<!--Album-->
<div class="center-column">
<figure class="image is-128x128">
<img src="./album_cover.jpg">
</figure>
<h2 class="title">
Arctic Gibbons
</h2>
<h2 class="subtitle">
NAVARO // Ft. Eric Clapton
<br />
<span>03.11.2018</span>
</h2>
<a class="button is-primary is-inverted">
<span class="icon">
<i class="fas fa-headphones-alt"></i>
</span>
<span>Listen</span>
</a>
</div>
<!--Song Table-->
<div class="container center-column" style="padding:25px">
<table class="table">
<thead>
<tr>
<th>Track</th>
<th>Song</th>
<th>Length</th>
<th>Listen</th>
<th>Buy</th>
</tr>
</thead>
<tbody>
<!-- Track 1 -->
<tr>
<th>1</th>
<td>The View from the Afternoon</td>
<td>3:19</td>
<td>
<a class="button is-primary">
<span class="icon">
<i class="fas fa-headphones-alt"></i>
</span>
</a>
</td>
<td>
<a class="button is-primary">
<span class="icon">
<i class="fas fa-shopping-cart"></i>
</span>
<span>Buy</span>
</a>
</td>
</tr>
<!-- Track 2 -->
<tr>
<th>2</th>
<td>I Bet You Look Good on the Dancefloor</td>
<td>2:53</td>
<td>
<a class="button is-primary">
<span class="icon">
<i class="fas fa-headphones-alt"></i>
</span>
</a>
</td>
<td>
<a class="button is-primary">
<span class="icon">
<i class="fas fa-shopping-cart"></i>
</span>
<span>Buy</span>
</a>
</td>
</tr>
<!-- Track 3 -->
<tr>
<th>3</th>
<td>Fake Tales of San Francisco</td>
<td>2:57</td>
<td>
<a class="button is-primary">
<span class="icon">
<i class="fas fa-headphones-alt"></i>
</span>
</a>
</td>
<td>
<a class="button is-primary">
<span class="icon">
<i class="fas fa-shopping-cart"></i>
</span>
<span>Buy</span>
</a>
</td>
</tr>
</tbody>
</table>
</div>
<div class="container center-column">
<audio src="https://www.bensound.org/bensound-music/bensound-dubstep.mp3" controls></audio>
<p>the audio should exist above and below this element</p>
<audio controls>
<source src="https://www.bensound.org/bensound-music/bensound-dubstep.mp3" type="audio/mpeg">
</audio>
</div>
</div>
</div>
</section>
</body>
</html>
解决方案
不幸的是,这似乎是 bulma(或底层minireset.css
)的一个错误:
https ://github.com/jgthms/bulma/issues/2060 。还有一个未决的拉取请求:https ://github.com/jgthms/minireset.css/pull/15 。
bulma 中的 minireset 将 设置height
为auto
,这会覆盖用户代理样式表并导致0px
.
CSSrevert
关键字在这里应该有所帮助,但不支持(Safari 除外):https ://caniuse.com/#feat=css-revert-value 。
如果您想/可以修改项目中的 bulma 源,您可以根据提到的拉取请求的最后一次提交“修补”minireset.sass
或。bulma.[min].css
推荐阅读
- c++ - 使用简单宏 C++ 的未声明标识符错误
- mysql - 在 MySQL 5.1 中将 utf8mb4_unicode_520_ci 更改为 utf8mb4_unicode_ci 有什么后果吗?
- python - OR-Tools 解决旅行商(TSP)问题,无需返回主节点
- python - 为什么使用 sudo pip 是个坏主意?
- ios - 监视文件更改时打开的文件过多
- php - Laravel 查询总行数
- python - PocketSphinx OSError: [Errno -9981] 输入溢出 PyAudio
- rest - REST API 按名称排序
- reactjs - reactjs中如何同时运行多个函数
- youtube-api - 获取特定日期和地区的 youtube 热门视频