css - Wordpress CSS 图像自动响应

标签 css wordpress

下图展示了我要完成的任务。

A)它在电脑的网络浏览器上,显示很酷。 B) 它在移动设备或小屏幕上。我想让图像出现在像 A 这样的移动设备上。

enter image description here

我在 header.php 中尝试在 Wordpress 上执行此操作。我一直在搜索,我得到了这个:

<a href="http://url">
<img src="http://urlIMAGE" width="100px" height="95px" style="max-width: 100%; height: auto;"/></a>
<a href="url" target="_blank">
<img src="http://urlIMAGE" width="100px" height="95px" style="max-width: auto; height: auto;"/></a> 

但它不起作用。

最佳答案

a img{width:100%; float:left;}

关于css - Wordpress CSS 图像自动响应,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20348458/

相关文章:

html - 为什么在 Chrome 和 Firefox 中元素宽度不同?

javascript - 如何使用 javascript 或 jquery 返回样式表中样式的 css 属性的值?

javascript - jquery 下拉菜单不起作用

html - 为什么奇数链接标签接收偶数标签的 css 属性?

html - Bing Autosuggest 下拉响应式 CSS

php - 我需要 memcached 和 Opcache 吗?

html - Wordpress CSS Sidebar 代码问题

mysql - 使用联接对大型用户数据库进行分页

css - div 中的垂直对齐被忽略

html - 如何让我的 div 高度与动态图像高度相匹配?