Html 如何在gallery中将图像固定到右下角
我有一个画廊工作的很好,但我想在画廊的右下角添加一个图像,所以 我希望: 我知道这个css可以解决这个问题:Html 如何在gallery中将图像固定到右下角,html,css,image,Html,Css,Image,我有一个画廊工作的很好,但我想在画廊的右下角添加一个图像,所以 我希望: 我知道这个css可以解决这个问题: #container_logo { position:fixed; right:0; bottom:0; margin:0; width:75%; height:75%; background:url(http://blog.logobee.com/free-logo1.jpg) no-repeat bottom right;
#container_logo {
position:fixed;
right:0;
bottom:0;
margin:0;
width:75%;
height:75%;
background:url(http://blog.logobee.com/free-logo1.jpg) no-repeat bottom right;
background-size:100%;
}
但如何将其添加到当前代码中
我尝试添加一行额外的background:url(http://blog.logobee.com/free-logo1.jpg)
:
但它没有显示在正确的位置
- 如何更改容器代码,使其右下角具有固定图像
请查看尝试将包含徽标的
div的宽度设置为包含图片的div的宽度(确保这是一个不变的数字,如百分比)。如果高度和宽度与大图相同。设置<代码>底部:0px;右:0px徽标的代码>应显示在图片的右下角。如果您使用边距
和填充
来调整主图片的位置,请确保它包含在徽标图片中,以便无论在何种大小的窗口中查看,它们都位于同一位置。请查看此图
您需要添加
<div id="container_logo"></div>
}
希望它有帮助…还有一个问题,如果我想让它响应,我会将该代码添加到相应的代码中?或者如何完成,在小提琴中,我有@媒体屏幕和(最小宽度:1200px){#containingDiv{width:100%;margin:0 auto;padding:0px 0 0;}
所以我会为每种情况添加您的代码,不是吗?Iyes,您也需要将我的CSS更改添加到这些更改中,只要确保根据需要调整它们。。。
<div id="container_logo"></div>
<div id="containingDiv">
#containingDiv {
width:680px;
height:470px;
position:relative;
margin:0 auto;
padding:0px 0 0 0;
}
#container_logo {
position:absolute;
z-index:500;
width:150px;
height:150px;
right:0;
bottom:0;
margin:0;
background:url(http://blog.logobee.com/free-logo1.jpg) no-repeat bottom right;
background-size:100%;