html - 电话图标仅出现在移动 View 中

标签 html css responsive-design

在我的网站上,我有一个电话图标,所以在移动 View 中,他们可以点击电话图标并调用某个业务,我不知道如何让它只出现在移动 View 中。

<style type="text/css">
  #tel {display:none;}
  @media all and (max-width: 1000px) {
    #tel {display:block;}
  }
</style>

<div class="tel">
<a href="tel:555-555-5555"><img src="images/phone.png" /></a>
</div>

最佳答案

#tel 

指的是一个id,你要用

.tel 

在 CSS 中

关于html - 电话图标仅出现在移动 View 中,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32855456/

相关文章:

css - 使用 HTML5 并排放置表单和 map 的内容

css - pure-g 和 pure-g-r 的区别

c# - 即使在函数中将 returnValue 设置为 False 后, Controller 操作也会执行

Javascript:如何只选中屏幕上的复选框

html - 抽屉导航打开时如何隐藏滚动条

javascript - JavaScript 对象中的条件语句

html - CSS 定位在左下角,距离顶部最小边距

html - 让 child 用填充物填充 100% 的 parent

html - 尝试使用 HTML/CSS 隐藏列时出现问题

html - 如何缩放 HTML 页面以获得高分辨率?