css - 如何使这个超链接响应。谢谢?
问题描述
这就是我的 HTML:
<div class="responsive">
<a href=""
target="_blank"><img alt="instalink" src=""
onmouseover="this.src=''"
onmouseout="this.src=''"/> </a>
CSS:
.responsive {
max-width: 100%;
height: auto;
}
多谢你们。
解决方案
您需要为其创建媒体查询。您的规则与屏幕尺寸无关。尝试这个:
.responsive {
max-width: 100%;
height: auto;
}
/* On screens that are 992px or less, set the background color to blue */
@media screen and (max-width: 992px) {
.responsive {
/*Your rule*/
}
}
/* On screens that are 600px or less, set the background color to olive */
@media screen and (max-width: 600px) {
.responsive {
/*Your rule*/
}
}
推荐阅读
- oracle - 当我选择时,只检查一列而没有重复
- mysql - 带有 spEl 注释的“无法解析对 BeanFactory 的 bean 引用”
- eclipse - 在 Eclipse Luna Release (4.4.0) 中安装 Maven 时出错
- r - 将多个栅格提取编译到一个表中
- javascript - 如何更改 JavaScript 中的布尔值?
- aspnetboilerplate - 迁移时执行自定义代码的地方
- mysql - 如何更新发送日期早于聊天开始的聊天消息?
- vim - 如何在vim中可靠地禁用ZZ映射
- java - SQLite Open Helper 创建空数据库
- javascript - 无法从提供的 XML 创建 MxGraph