我想在Joomla 3x的文章中为div添加全宽背景图片,但我不知道如何。一篇或多个模块可以添加后缀类,但仅适用于文章或模块的div,仍然不是全宽。
代码示例:
<div class="container">
<div class="article-wrapper">article here</div>
</div>
我可以添加的后缀类只是 article-wrapper ,但我需要添加到容器。
有人帮忙吗?
答案 0 :(得分:0)
您真正需要做的就是add a custom CSS file指定一个合适的选择器和背景图像,如下所示:
#content {
background: url(background-image.jpg) no-repeat center center fixed;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
}
选择器将取决于模板,因此您需要使用FireBug或开发人员工具或类似工具进行挖掘。
答案 1 :(得分:0)
以下代码应该有效。但是这个turtles-own [
id
id2
id3
]
to list-of-lists
;;; these lists are just placeholders, of course, use your real list of lists
;;; as the "ids_list" variable in this case
let id1list [ 1 2 3]
let id2list [ 44 55 66 ]
let id3list [ "a" "b" "c" ]
let ids_list ( list id1list id2list id3list )
let n 0
while [ n < 3 ] [ ;;; or however many turtles you end up wanting,
;;; as long as you have list variables for them
create-turtles 1 [
set id item n (item 0 ids_list)
set id3 item n (item 2 ids_list)
]
set n n + 1
]
end
div也应该是全宽的。
.container
如果您在该页面上有多个.container {
background: url(background-image.jpg) no-repeat center center fixed;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
}
div,则必须使用子选择器。即
.container