【发布时间】:2019-08-06 05:40:33
【问题描述】:
我是一名编码新手 - 使用 CSS flex box 创建一个模拟响应式布局,但我无法在最宽的视口中水平对齐页眉元素,以及将页脚均匀地弯曲到空间。
对于标题,我尝试了display:inline 和text-align:center,但没有成功。对于页脚,我尝试了display:flex 和justify-content: space-evenly 也没有成功。
<html>
<body>
<header>
<div class="logo">
<h1>actual image logo here</h1>
<h1>The ABC Company</h1>
</div>
</header>
<footer>
<ul class="social">
<li class="social_icon">Twitter Logo here</li>
<li class="social_icon">Facebook logo here</i></li>
<li class="social_icon">Insta logo here</li>
</ul>
</footer>
</body>
</html>
【问题讨论】:
-
显示代码,看不到问题很难说是哪里出了问题 可以用codepen或者jsFiddle,或者这里加代码sn-p,我们可以帮你