HTML:字體真棒圖標不頁腳中正確顯示
<div id="container">
<h1>This website is currently getting a makeover.</h1>
<p>It will be back shortly with updated portofolio, revamped (custom) design, and new pricing.</p>
<footer>
<p class="left copyright">Copyright © 2016 Patrick Black</p>
<a class="social right" href="#"><i class="fa fa-twitter fa-2x"></i></a>
</footer>
</div>
CSS(使用預處理;手寫筆;如果想完整的代碼請評論:
html {
position relative
min-height 100%
}
body {
font-family: 'Roboto', sans-serif;
text-align center
height 100%
margin 0 0 50px
}
h1 {
margin-top: 30vh;
}
footer {
background black
color white
height 50px
position absolute
bottom 0
left 0
width 100%
}
.left {
text-align left
}
.right {
float right
}
.copyright {
margin-left 10px
}
.social {
display inline-block
}
下面是完整的代碼:: http://codepen.io/Mortiferr/pen/pyLYqa 作爲您可以看到,Twitter圖標顯示在頁腳下方
甜。現在,它不是居中的,我該如何解決這個問題。 – Mortiferr
這是一個不同的問題。就我個人而言,我不會在這裏使用花車。 –
哦,好的。不管怎麼說,還是要謝謝你。 – Mortiferr