html - 如何制作两端带圆圈的水平边框

标签 html css border

我需要像这张图片一样制作边框

http://i.imgur.com/sFVUTrk.jpg

有人有想法吗? 我尝试使用 css 的 :after 和 :before 属性,但没有成功。 html 标签是一个 h1,底部需要那种边框。有可能实现吗?

最佳答案

伪元素!

div {
    border-bottom: 2px solid black; 
    padding-bottom: 15px; 
    position: relative;
}

div:before, 
div:after {
    position: absolute; 
    bottom: -6px; 
    left: 0; 
    height: 10px; 
    width: 10px; 
    background: black; 
    content: ""; 
    border-radius: 5px;
}

div:after {
    right: 0; 
    left: auto;
}

fiddle :http://jsfiddle.net/GVb59/

关于html - 如何制作两端带圆圈的水平边框,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23746628/

相关文章:

javascript - websocket javascript 读写

javascript - 尝试添加 slideToggle() 函数但它不起作用

html - 我的全屏 div 似乎不起作用

javascript - 在 for 循环中创建 .on() 元素时,如何使 .on(function) 调用当前索引?

html - 彼此有 3 个 div,中间有间隔符

html - 我怎样才能在这段代码 css html 中像评级明星一样做悬停效果?

html - 带有背景图像的 thead 和 tfoot 中的边界半径

float div 上的 CSS 边框

html - CSS 标题固定位置

html - 如何制作不同种类的边框