html - 制作响应标题背景div

标签 html css responsive-design joomla3.0

<分区>


关闭 7 年前

我的 joomla 模板中有一个模块,我想将它的标题添加到图像中。 我不知道如何让它响应? (我的模块的内容是响应式的,但图像标题不是)。

这是我的代码:

.t3-module.module.map1-title{
  background: rgba(0, 0, 0, 0) url(".../.../images/pages.png") no-repeat scroll 0 0;
     background-size:auto;
}

最佳答案

参见示例:fiddle

HTML:

<div id="one"></div>

CSS:

html, body{width:100%; height:100%; padding:0px; margin:0px;}
#one{width:100%; height:100%; background:url(http://www.keenthemes.com/preview/metronic/theme/assets/global/plugins/jcrop/demos/demo_files/image1.jpg) left top no-repeat; background-size: 100%;}

关于html - 制作响应标题背景div,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34087100/

上一篇:jquery - 移动设备上缺少 photoswipe 全屏按钮

下一篇:css - 在纸质菜单 Polymer 1.0 中使用不同的颜色

相关文章:

html - 如何将宽度拉伸(stretch)到可滚动区域的 100%?

html - Twitter Bootstrap 轮播响应无法正常工作

float 图像旁边的 CSS 最小标题 <h1, h2, h3> 宽度

html - css 原地旋转一个div 180度

javascript - 在隐藏和显示元素时添加微妙的动画 -CSS -JS

javascript - 使用 JavaScript 进行验证 - 如何向所有验证错误消息显示

javascript - jQuery表格搜索切表头

javascript - 为不同的浏览器应用css

html - 表格高度修复不适用于 Bootstrap 式百分比布局

css - 使用 css 媒体查询防止主容器拉伸(stretch)超过 1680px