我想在语言切换栏和登录栏中添加背景,如下图所示: http://s21.postimg.org/ra5z6djyv/Untitled_1.jpg
这两个部分有两个名为“position2”和“position1”的模块。
我还可以将模块的“自定义类”与我的template.css中的特定代码相关联,因此我只需要一个样式代码。我应该在模板中添加什么CSS才能使其工作?
以下是我的代码并添加它们我得到这个: http://s30.postimg.org/6yjew3601/Untitled_1.jpg
“postion1”的代码:
.flag-container {
background:#88e1f9;
border-radius: 0px 0px 8px 0px;
-moz-border-radius: 0px 0px 8px 0px;
-webkit-border-radius: 0px 0px 8px 0px;
border: 0px solid #800000;
}
代码“position2”:
.box-color {
background:#88e1f9;
border-radius: 0px 0px 0px 8px;
-moz-border-radius: 0px 0px 0px 8px;
-webkit-border-radius: 0px 0px 0px 8px;
border: 0px solid #800000;
}
/ 按钮样式的附加代码 /
.box-color ul
{
float:center;
width:100%;
padding:0;
margin:0;
list-style-type:none;
}
.box-color a
{
float:right;
text-align:center;
width:4em;
text-decoration:none;
color:#666;
background-color:transparent;
padding:0.2em 0.6em;
border-width:1px solid black;
}
.box-color a:hover {background-color:#ff3300;}
.box-color li {display:inline;}
谢谢!
答案 0 :(得分:0)
好的,所以我假设你写的是什么,你知道Module Class Suffix's。完成此操作后,假设您添加“自定义”类,您的CSS就会像这样:
.custom {
background: #62BBDD;
border-radius: 0px 0px 5px 5px;
}
您可以将其添加到 template.css 文件中。
您可以将#62BBDD
更改为您希望的任何颜色
<强>更新强> 如果不查看您的网站,很难弄清楚如何删除间距,因此我唯一建议的是“快速修复”解决方案。
将此添加到您的.flag-container
类CSS:
position: relative;
right: 40px;
所以它最终会是这样的:
.flag-container {
background:#88e1f9;
border-radius: 0px 0px 8px 0px;
-moz-border-radius: 0px 0px 8px 0px;
-webkit-border-radius: 0px 0px 8px 0px;
border: 0px solid #800000;
position: relative;
right: 40px;
}
请注意,您可能需要更改40px
,直到遇到其他容器