[英]Footer formatting issues
I'm trying to create a footer on my homepage with an image that takes up 100% width.我正在尝试在我的主页上创建一个页脚,其图像占据 100% 的宽度。 I also then want a LinkedIn image linked to my LinkedIn account in the center of this footer.
然后,我还希望在此页脚的中心有一个链接到我的 LinkedIn 帐户的 LinkedIn 图像。 How do i get the LinkedIn logo and the footer picture to stay in the same positions and resize together when i adjust the browser window size?
当我调整浏览器 window 大小时,如何让 LinkedIn 徽标和页脚图片保持在相同位置并一起调整大小? And is there a way to get my footer to float to the bottom of the page so when I adjust browser size it always stays glued to the bottom?
有没有办法让我的页脚浮动到页面底部,所以当我调整浏览器大小时,它总是粘在底部? Here's what I've written so far:
这是我到目前为止所写的:
<footer>
<img src="images/IMG_7745 (1).jpeg" alt="photography" id="tree_photo"><a href="linkedin.com/in/coby-labella"><img src="images/linkedinlogo.png" id="linkedin_logo" alt="logo"></a>
</footer>
#tree_photo{
width: 101%;
opacity: 40%;
margin-top: 1%;
margin-left: -1%;
margin-bottom: -1%;
display: inline;
positon: fixed;
bottom: 0
}
#linkedin_logo{
display: inline;
position: absolute;
right: 42%;
bottom: -23.5%;
opacity: 80%;
}
If i understood what you want to do there's the css:如果我明白你想要做什么,那就是 css:
footer {
overflow:hidden;
position:fixed;
width:100%;
left:0;
right:0;
}
#tree_photo{
width: 101%;
opacity: 40%;
margin-top: 1%;
margin-left: -1%;
margin-bottom: -1%;
display: inline;
position: absolute;
bottom: 0;
}
#linkedin_logo{
display: inline;
position: absolute;
right: 42%;
bottom: 0;
opacity: 80%;
}
the position:fixed locks the footer on the screen, you already know left:0 and bottom:0 i guess. position:fixed 将页脚锁定在屏幕上,你已经知道 left:0 和 bottom:0 我猜。 the overflow:hidden doesn't let the footer collapse on the absolute positioned elements.
溢出:隐藏不会让页脚在绝对定位的元素上折叠。 also you could use the background-image propriety on the footer to display the tree image
您也可以使用页脚上的背景图像属性来显示树图像
Hope it will help希望它会有所帮助
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.