在PHP中的重复渐变图像上添加图像

时间:2012-12-03 21:20:35

标签: css

我环顾四周,但我遇到的任何东西似乎都在努力实现我想要实现的目标。

我有盒子,我正在使用渐变/背景。该框询问用户是否要为朋友购买该产品,因此我也想在其中添加礼品照片。问题是礼物照片出现在另一张图片的背面,我找不到办法解决它。

顺便说一句,我正在使用主题制作WP。

这是我的代码:

PHP

<div class="gift boxed3">
                    <span class="gift_title">
                           <?php gb_e('Buy for friend') ?>
                    </span>
                </div>

CSS

.gift{
font-size: 0.6em;
font-family: Arial;
float:left;
}


.gift_title {
color: #666666;
font-size: 15px;
font-family: arial;
font-weight: bold;
margin-left: 10px;
margin-top: 10px;
line-height: 66px;
}

.boxed3 {
width: 297px;
height:65px;
background-color: #f9f9f9;
margin-top: 15px;
border-radius: 5px;
-moz-border-radius: 5px;
background-image: url(http://domain.gr/example/gradient.png);
background-repeat: repeat-x;
background-position: center bottom;
border-bottom: 1px solid #CCC;
border-bottom: 1px solid rgba(0, 0, 0, .1);
box-shadow: 0 1px 1px #7D7D7D;
}

1 个答案:

答案 0 :(得分:0)

以防该帖子将来帮助某人。这就是我设法解决我面临的问题的方法。

注意:我正在使用WordPress。

<div class="gift boxed3">
                     <span class="gift_image">
                            <img src="http://topgreekgyms.fitnessforum.gr/wp-content/uploads/2012/12/gift.png";?>
                     </span>

                     <span class="gift_title">
                            <a href="<?php gb_add_to_cart_url(); ?>" class=""><?php gb_e('Buy for friend') ?></a>
                      </span>
                </div>

CSS

.gift{
    font-size: 0.6em;
    font-family: Arial;
    float:left;
    }

    .gift_title {
    color: #666;
    font-size: 15px;
    font-family: arial;
    font-weight: bold;
    margin-left: 3px;
    margin-top: 10px;
    line-height: 66px;
    }

    .gift_image {
    float: left;
    margin: 16px 9px;
    }

    .boxed3 {
    width: 297px;
    height:65px;
    background-color: #f9f9f9;
    margin-top: 15px;
    border-radius: 5px;
    -moz-border-radius: 5px;
    background-image: url(http://topgreekgyms.fitnessforum.gr/wp-content/themes/blank-child-theme/img/gradient.png);
    background-repeat: repeat-x;
    background-position: center bottom;
    border-bottom: 1px solid #CCC;
    border-bottom: 1px solid rgba(0, 0, 0, .1);
    box-shadow: 0 1px 1px #7D7D7D;
    }
相关问题