2017-01-03 80 views
1

我想在WordPress页脚中添加自定义分隔形象,这是我的functions.php代码:添加自定义图像作为分隔在WordPress页脚

function advertica_lite_widgets_init() { 
register_sidebar(array(
    'name' => 'Page Sidebar', 
    'id' => 'page-sidebar', 
    'before_widget' => '<li id="%1$s" class="ske-container %2$s">', 
    'after_widget' => '</li>', 
    'before_title' => '<h3 class="ske-title">', 
    'after_title' => '</h3>', 
)); 
register_sidebar(array(
    'name' => 'Blog Sidebar', 
    'id' => 'blog-sidebar', 
    'before_widget' => '<li id="%1$s" class="ske-container %2$s">', 
    'after_widget' => '</li>', 
    'before_title' => '<h3 class="ske-title">', 
    'after_title' => '</h3>', 
)); 
register_sidebar(array(
    'name' => 'Footer Sidebar', 
    'id' => 'footer-sidebar', 
    'before_widget' => '<div id="%1$s" class="ske-footer-container span3 ske-container %2$s">', 
    'after_widget' => '</div>', 
    'before_title' => '<h3 class="ske-title ske-footer-title">', 
    'after_title' => '</h3>', 
)); } 

我想所有3块之间添加图片作为分隔符,我尝试了几个谷歌的帮助,但没有得到任何帮助有关的我在找什么。有没有人可以帮助我进行修改?

我希望它是这样的:

enter image description here

+1

在哪里添加图像,水平还是垂直? –

+0

@devilcrab请你分享你的链接?所以我会更好地检查这个问题。 – purvik7373

+0

伙计们结帐我已经添加图像我想要它的方式,你看到上面,其中WIDGET 1,2,3是主题基地的默认代码,但我想添加水平酒吧,我已准备好PNG格式。 – devilcrab

回答

2

.ske-container{ 
 
    display: inline-block;  
 
    padding: 0px 5px; 
 
\t width:30%; 
 
\t float:left; 
 
    text-align:center; 
 
    height:200px; 
 
    background-image: url("https://i.stack.imgur.com/3vmnN.png"); 
 
    background-repeat: no-repeat; 
 
    background-position: right top; 
 
} 
 
.ske-container:last-child{ 
 
\t background-image: none; 
 
}
<div> 
 
    <div class="ske-container"> 
 
    Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. 
 
    </div> 
 
    <div class="ske-container"> 
 
    Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. 
 
    </div> 
 
    <div class="ske-container"> 
 
    Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. 
 
    </div> 
 
</div>

请您在您的当前主题style.css上面加CSS?并检查它。

+0

明白了,但它仍然添加到最后一节。 – devilcrab

+0

@devilcrab这只是你可以删除'.ske-container:last-child' CSS。 – purvik7373

+0

我已经删除了这个“.ske-container:last-child { \t background-image:none;}”但仍然显示,这就是为什么我问 – devilcrab