我的 css/html 很烂,所以我在这里问。
我有这段代码,但按钮不起作用:/我做错了什么?
<div class="col-sm-12 col-md-4">
<div class="single-item res-sm text-center moreCards" data-uri="steam-card">
<div class="single-item-icon">
<button class="unstyled-button" style="border:none;background-color:F1F1F1;"><i href="https://steam.com" class="zmdi zmdi-steam animated infinite pulse zmdi-hc-fw"></i></button>
</div>
<h4 class="ht-pt">Steam</h4>
</div>
</div>
最佳答案
href
属性不适用于 <i>
标签。它通常适用于 anchor 标签 <a href="/some/link">Content</a>
.
试试这个:
<div class="col-sm-12 col-md-4">
<div class="single-item res-sm text-center moreCards" data-uri="steam-card">
<div class="single-item-icon">
<a href="https://steam.com" class="unstyled-button" style="border:none;background-color:F1F1F1;"><i class="zmdi zmdi-steam animated infinite pulse zmdi-hc-fw"></i></a>
</div>
<h4 class="ht-pt">Steam</h4>
</div>
</div>
关于html - 我的带有 zmdi 图标的 html 按钮不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51432309/