gpt4 book ai didi

html - 页脚中的图像和文本对齐方式

转载 作者:行者123 更新时间:2023-11-28 07:39:01 25 4
gpt4 key购买 nike

我目前正在学习 css 和 html,同时定制一个 wordpress 主题,但是,我无法将图像和文本缩放到移动设备。

问题是我有两个有白色背景的部分,第一个有 3 张图片,其中有链接,第二个是带有站点地图等的典型页脚。

我想将图片居中并使其在移动设备上缩放,页脚也是如此。

目前最后一张图片被下拉

http://codepen.io/phoez/pen/RPjdrr

#partnerzy {
background-color: #ffffff;
height: 80px;
width: auto;
}
#rgw {
padding-left: 10%;
padding: 10px;
float: left;
}
@media (max-width: 800px) {
#rgw {
padding-left: 10%;
padding: 10px;
float: left;
max-width: 40%;
}
}
#zgs {
padding-left: 15%;
float: left;
text-align: center;
width: auto;
}
@media (max-width: 800px) {
#zgs {
/* padding-left: 25%; */
float: left;
text-align: center;
width: auto;
max-width: 40%;
}
}
#sa {
padding-left: 25%;
float: left;
width: auto;
}
@media (max-width: 800px) {
#sa {
padding-left: 55%;
width: auto;
max-width: 33%;
}
}
#stopka ul {
list-style: none !important;
background-color: #ffffff !important;
text-align: center !important;
padding: 0 !important;
margin: 0 !important;
}
#stopka a {
text-decoration: none !important;
display: block !important;
}
#stopka li {
margin-left: 30px;
font-family: "Roboto", sans-serif !important;
font-size: 13px;
font-weight: 700 !important;
text-decoration: none;
color: #999999;
line-height: 40px;
height: 40px;
display: inline-block;
margin-right: 5px;
}
#stopka {
background-color: #ffffff;
height: 80px;
width: auto;
}
<div id="partnerzy">
<div id="rgw">
<a href="">
<img alt="RGW" src="http://38.media.tumblr.com/avatar_c9671e5c8ca3_128.png">
</a>
</div>
<div id="zgs">
<a href="">
<img alt="ZGS " src="http://38.media.tumblr.com/avatar_c9671e5c8ca3_128.png">
</a>
</div>
<div id="sa">
<a href="">
<img alt="Schleifenbaum & Adler" src="http://38.media.tumblr.com/avatar_c9671e5c8ca3_128.png">
</a>
</div>
</div>
<br>
<br>
<div id="stopka">
<li class="mapa"><a href="">Sitemap</a>
</li>
<li class="redakcja"><a href="">Editorial office</a>
</li>
<li class="nota"><a href="">Legal note</a>
</li>
<li class="politykacookies"><a href="">Cookies policy</a>
</li>
<li class="regulamin"><a href="">Portal rules</a>
</li>
</div>

有什么想法吗?

最佳答案

#partnerzy {
background-color: #ffffff;
width: auto;
text-align: center;
}
#partnerzy > div{
padding: 10px;
display: inline-block;
text-align: center;

}

#stopka ul {
list-style: none !important;
background-color: #ffffff !important;
text-align: center !important;
padding: 0 !important;
margin: 0 !important;
}
#stopka a {
text-decoration: none !important;
display: block !important;
}
#stopka li {

margin-left: 30px;
font-family: "Roboto", sans-serif !important;
font-size: 13px;
font-weight: 700 !important;
text-decoration: none;
color: #999999;
line-height: 40px;
height: 40px;
display: inline-block;
margin: 0 15px;
}
#stopka {
background-color: #ffffff;
height: 80px;
width: auto;
clear: both;
text-align: center;
}
@media (max-width: 520px){
#partnerzy > div{
display: block;
clear: both;
}
#partnerzy > div img{
width: 60%;
}
}
<div id="partnerzy">
<div id="rgw">
<a href="">
<img alt="RGW" src="http://38.media.tumblr.com/avatar_c9671e5c8ca3_128.png">
</a>
</div>
<div id="zgs">
<a href="">
<img alt="ZGS " src="http://38.media.tumblr.com/avatar_c9671e5c8ca3_128.png">
</a>
</div>
<div id="sa">
<a href="">
<img alt="Schleifenbaum & Adler" src="http://38.media.tumblr.com/avatar_c9671e5c8ca3_128.png">
</a>
</div>
</div>

<div id="stopka">
<li class="mapa"><a href="">Sitemap</a>
</li>
<li class="redakcja"><a href="">Editorial office</a>
</li>
<li class="nota"><a href="">Legal note</a>
</li>
<li class="politykacookies"><a href="">Cookies policy</a>
</li>
<li class="regulamin"><a href="">Portal rules</a>
</li>
</div>

关于html - 页脚中的图像和文本对齐方式,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31052077/

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