我在一个网格中有三个响应大小的 div,它们的边框顶部需要被图像打断。一旦我弄清楚如何用图像打断顶部边框,我会用白色方块对底部边框做同样的事情。所需效果显示在此屏幕截图中:https ://ia601903.us.archive.org/20/items/ScreenShot20131007At12.30.32/Practivate-mockup.png
但是,到目前为止,我设法得到的最接近的是:https ://ia601903.us.archive.org/20/items/ScreenShot20131007At12.30.32/Screen%20Shot%202013-10-07%20at%2012.30.32 .png
问题是绝对定位会破坏页面的流动,如果一切都是固定宽度,我可以解决这个问题,但由于它都是响应式的(内置于 Foundation 4),所以宽度都是未知的。有没有人知道如何在没有绝对定位的情况下做到这一点?
这是我正在使用的代码(内联样式只是为了让在这个网站上更容易阅读,而不是在实际代码中出现):
<div class="row" id="about">
<div class="large-4 columns centered" id="entrepreneurs">
<div class="thickborder" style="padding-right:10px; padding-left: 10px; margin-top:20px; position:relative">
<img src="img/white/guitar.png" style="position: absolute; top: -89px;">
<h2 class="subheader"> For entrepreneurs </h2>
<p> Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse a venenatis quam, et sagittis quam. Aenean vehicula euismod ipsum, eget blandit libero auctor nec. Aenean pharetra sapien nec risus euismod mattis. Vestibulum volutpat tincidunt blandit. Curabitur dapibus ultrices arcu luctus condimentum. Morbi tellus nisi, accumsan sed hendrerit sit amet, mollis non sapien. Nulla eget purus ut nunc lacinia dignissim. Vestibulum feugiat porta cursus. Curabitur posuere mollis massa quis mollis. Suspendisse ac luctus est, nec vestibulum dolor.</p>
</div></div>
<div class="large-4 columns centered" id="corporates">
<div class="thickborder" style="padding-right:10px; padding-left: 10px; margin-top:20px; position:relative">
<img src="img/white/cloud.png" style="position: absolute; top: -89px">
<h2 class="subheader"> For corporates </h2>
<p> consectetur adipiscing elit. Suspendisse a venenatis quam, et sagittis quam. Aenean vehicula euismod ipsum, eget blandit libero auctor nec. Nulla eget purus ut nunc lacinia dignissim. Vestibulum feugiat porta cursus. Curabitur posuere mollis massa quis mollis. Suspendisse ac luctus est, nec vestibulum dolor. Suspendisse potenti. Vivamus egestas vestibulum ante egestas adipiscing. In hac habitasse platea dictumst. Etiam eros orci, bibendum ut ultricies quis, mollis ut dolor.</p>
</div></div>
<div class="large-4 columns centered" id="results">
<div class="thickborder" style="padding-right:10px; padding-left: 10px; margin-top:20px; position:relative">
<img src="img/white/drinks.png" style="position: absolute; top: -89px">
<h2 class="subheader"> For results </h2>
<p> Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse a venenatis quam, et sagittis quam. Aenean vehicula euismod ipsum, eget blandit libero auctor nec. Aenean pharetra sapien nec risus euismod mattis. Vestibulum volutpat tincidunt blandit. Curabitur dapibus ultrices arcu luctus condimentum. Morbi tellus nisi, accumsan sed hendrerit sit amet, mollis non sapien. Nulla eget purus ut nunc lacinia dignissim. Vestibulum feugiat porta cursus. Curabitur posuere mollis massa quis mollis. Suspendisse ac luctus est. </p>
</div></div>
</div>
任何想法都非常感谢。这应该是一个对更多人有用的问题,而不仅仅是我——除非这里的问题是我是新手。