gpt4 book ai didi

css - 我怎样才能重新定位这张图片?

转载 作者:太空宇宙 更新时间:2023-11-04 13:33:46 25 4
gpt4 key购买 nike

我想把书的图片移到this page上进入黑匣子。如何做到这一点?

感谢您的帮助。

这本书的图像被裁剪得很紧。它是透明背景上的 PNG 文件。这是我的相关代码。我希望这本书出现在功能框的右侧,文字环绕它。

.featured-box {
border-radius: 20px;
background-color: #000;
color: #fff;
padding: 20px;
margin: 0 auto;
margin-top: 10px;
overflow: visible;
width: auto;
max-width: 1160px;
}

.featured-box h4 {
font-size: 20px;
color: #fff;

}

.featured-box p {
padding: 0 0 20px;
}

.featured-box ul {
margin: 0 0 20px;
}

.featured-box ul li {
list-style-type: disc;
margin: 0 0 0 30px;
padding: 0;
align: right;
}

.featured-box .enews p {
padding: 10 10 10 10px;
color: #fff;
float: left;
width: 220 px;
margin: 10 10 10 10px;

}

.featured-box .enews #subscribe {
padding: 20 20 20 20px;;

}

.featured-box .enews #subbox {
background-color: #fff;
margin: 0;
width: 300px;

}

.featured-box .enews .myimage {

float: right;
margin-left: 10px;
margin-right: 50px;
margin-bottom: 50px;


width: auto;
}
.myimage {

float: right;

}
.featured-box .enews input[type="submit"] {
background-color: #d60000;
padding: 10 10 10 10px;
width: 150px;

}



@media screen and (min-width: 1024px) and (max-width: 1139px) {
div.featured-box {
margin-top: 135px;

}
}

@media screen and (min-width: 1140px) {
div.featured-box {
margin-top: 70px;
}
}


#text-4 > div:nth-child(1) > h4:nth-child(1) {
color: #fff;
font-size: 1.3em; font-weight: normal;
text-transform: uppercase;
background-color: #d60000;
position: relative;
margin: 0px -70px 20px -50px;
padding: 18px 0px 16px 50px;

}

#text-4 > div:nth-child(1) > h4:nth-child(1):after {
content: '';
display: block; height: 40px; width: 40px;
background: url(http://bryancollins.eu/wp/wp-content/uploads/2014/04/fold.png) no-repeat 0 0;
position: absolute; right: 0px; bottom: -40px;

}

.page p { line-height: 1.2em; }
.page a { color: #1badd2; text-decoration: none; }
.widget li {

margin: 0;
padding: 2px 0px 8px 35px;
display: block; position: relative;
border-bottom: none;

}


.featured-box .widget li {
list-style: none;
background: url("http://bryancollins.eu/wp/wp-content/uploads/2014/04/arrow.png") no-repeat scroll 0 10px rgba(0, 0, 0, 0);
display: block;
margin: 0 0 0 30px;
padding: 0 0 0 40px;
}

最佳答案

我想我得到了你想要的添加这个 CSS 并将包含黑框内的所有内容

section.enews-widget {
overflow: hidden;
}

非常简单。

------更新--------

对于较小的屏幕,将此添加到您的较小屏幕媒体查询中

@media only screen and (max-width: 767px) {
section.enews-widget {
clear: both;
}
.myimage {
float: none;
}
.myimage img {
display: block;
height: auto;
margin: 0 auto;
}
}

希望这就是您要找的。

------------更新 2------------

在查看您的 CSS 后,您似乎遇到了一些问题,请删除文件底部的此 CSS

@media screen and (min-width: 1140px) {
div.featured-box {
margin-top: 70px;
}

@media only screen and (max-width: 767px) {
section.enews-widget {
clear: both;
}
.myimage {
float: none;
}
.myimage img {
display: block;
height: auto;
margin: 0 auto;
}


}

#text-4 > div:nth-child(1) > h4:nth-child(1) {
color: #fff;
font-size: 1.3em; font-weight: normal;
text-transform: uppercase;
background-color: #d60000;
position: relative;
margin: 0px -60px 20px -20px;
padding: 18px 0px 16px 20px;

}

#text-4 > div:nth-child(1) > h4:nth-child(1):after {
content: '';
display: block; height: 40px; width: 40px;
background: url(http://bryancollins.eu/wp/wp-content/uploads/2014/04/fold.png) no-repeat 0 0;
position: absolute; right: 0px; bottom: -40px;

}

.page p { line-height: 1.2em; }
.page a { color: #1badd2; text-decoration: none; }
.widget li {

margin: 0;
padding: 2px 0px 8px 35px;
display: inline; position: relative;
border-bottom: none;

}


.featured-box .widget li {
list-style: none;
background: url("http://bryancollins.eu/wp/wp-content/uploads/2014/04/arrow.png") no-repeat scroll 0 10px rgba(0, 0, 0, 0);
display: inline;
margin: 0 0 0 30px;
padding: 0 0 0 40px;
}

有了这个:

@media screen and (min-width: 1140px) {
div.featured-box {
margin-top: 70px;
}
}/* you needed to close this media query */

@media only screen and (max-width: 767px) {
section.enews-widget {
clear: both;
}
.myimage {
float: none;
}
.myimage img {
display: block;
height: auto;
margin: 0 auto;
}
}

#text-4 > div:nth-child(1) > h4:nth-child(1) {
color: #fff;
font-size: 1.3em; font-weight: normal;
text-transform: uppercase;
background-color: #d60000;
position: relative;
margin: 0px -60px 20px -20px;
padding: 18px 0px 16px 20px;

}

#text-4 > div:nth-child(1) > h4:nth-child(1):after {
content: '';
display: block; height: 40px; width: 40px;
background: url(http://bryancollins.eu/wp/wp-content/uploads/2014/04/fold.png) no-repeat 0 0;
position: absolute; right: 0px; bottom: -40px;

}

.page p { line-height: 1.2em; }
.page a { color: #1badd2; text-decoration: none; }
.widget li {

margin: 0;
padding: 2px 0px 8px 35px;
display: inline; position: relative;
border-bottom: none;

}


.featured-box .widget li {
list-style: none;
background: url("http://bryancollins.eu/wp/wp-content/uploads/2014/04/arrow.png") no-repeat scroll 0 10px rgba(0, 0, 0, 0);
display: inline;
margin: 0 0 0 30px;
padding: 0 0 0 40px;
}

关于css - 我怎样才能重新定位这张图片?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23185413/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com