html - 如何在页脚中显示垂直白色边框?

标签 html css

我需要在页脚宽度的 90% 左右制作垂直白色边框。

它应该是这样的:

enter image description here

我目前的情况与图像相同,但右侧没有白线。

footer {
  width: 100%;
  background-color: #CDDE47;
  padding: 10px;
}
<footer>
  <h2>Contact us</h2>
  <p><em>You can find our physical location on:<br>
                42 Tree lane, CB2345, Cambridge, Cambridgeshire, United Kingdom</em>
  </p>

  <a href=""><em>+44 (2345) 345 456</em></a>
  <br>
  <a href=""><em><a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="432a2d252c0324312c342a372622372a376d202c6d3628" rel="noreferrer noopener nofollow">[email protected]</a></em></a>

  <ul>
    <li><a href=""><em>Check out our facebook page</em></a>
    </li>
    <li><a href=""><em>Check out our twitter feed</em></a>
    </li>
  </ul>
</footer>

最佳答案

给你的页脚position:relative并在其中添加一个div.verticalLine,定义如下:

.verticalLine{
    position: absolute;
    top: 0;
    right: 10%;
    width: 30px;
    height: 100%;
    background: #fff;
}

关于html - 如何在页脚中显示垂直白色边框?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39876997/

相关文章:

php - 添加到 SQL 数据库的 AJAX/HTML/PHP 代码有什么问题?

javascript - 带有 angularjs 的 TreeView

javascript - 获取图片尺寸(高和宽)Js或jquery

css - purecss 是怎么回事?

jquery - Bootstrap - 修复了没有其余栏的可折叠导航栏按钮

html - BootStrap navbar-brand 类中的 Logo 表现异常

css - 查看网页div结构的工具

javascript - JS/CSS - 在网页上为 JS 禁用用户显示半透明层

css - 赋予虚拟图像自然的宽度和高度以做出响应

javascript - 当内容滚动到 View 中时激事件画