將我的圖像放置在文字的左側和右側2個字符時出現問題。下面是它的外觀圖片:放置圖像時出現問題
正如你所看到的圖像是向下跌破黑盒子,我希望他們每個人要它旁邊,現在頁面上的背景被延長由於圖像被進一步推低。
這裏是我的CSS代碼:
.support-text {
width: 600px;
position: relative;
margin-left: auto;
margin-right: auto;
line-height: -2px;
margin-bottom: 130px;
clear: left;
}
.support-text h1 {
font-size: 30px;
}
.support-text {
font-size: 23px;
}
.support-img {
margin-top: -80px;
margin-bottom: 80px;
z-index: 1;
}
.ct-pic {
float: right;
width: 700px;
height: 596px;
bottom: 30px;
background-image: url('../img/ct.png');
}
.ct-pic:hover {
-webkit-filter: brightness(180%);
}
.t-pic:hover {
-webkit-filter: brightness(180%);
}
.t-pic {
float: left;
width: 770px;
height: 596px;
margin-left: -60px;
margin-bottom: -1px;
background-image: url('../img/t.png');
}
這裏的HTML代碼:
<div class="main-wrapper">
<section class="support-text">
<img src="img/support-us.png" class="support-img">
<p> hello hello hello hello hello hello hello hello hello hello hello hello hello hello hello</p>
</section>
<div class="ct-pic">
</div>
<div class="t-pic">
</div>
</div>
嘿,謝謝你的回覆,但圖像需要一定的火焰效果才能適應,反正有圖片向上移動,所以背景不會伸展下來,所以他們在文本框 – erdrag 2015-03-31 22:15:13
我確信有,你可以請[JSFiddle](https://jsfiddle.net/),或提供鏈接到您的網站? – 2015-03-31 22:18:07
jsfiddle沒有工作,但我可以盡力解釋它,因爲我可以,奧基,所以我有2個圖像,左邊的一個和右邊的一個,黑色的盒子假設是一個文本框,它的標題是標題,文本框是600像素,我的容器div是1460像素,但我不能縮小圖像,因爲這樣他們射擊的射擊效果就會消失,所以我會被剪掉需要它們與現在的尺寸相同,我需要做的唯一事情就是將它們移動起來,但我不知道如何去除延伸出來的背景,因爲按下了圖像。 – erdrag 2015-03-31 22:20:31