css - 使用 CSS 在容器周围添加花式对 Angular 线边框

标签 css border containers

我愿意在容器周围实现花哨的对 Angular 线边框效果我想通过 CSS 设置样式我知道通过使用前后伪元素我们可以在容器周围设置不同的排序或边框但是这里的情况是不同的你可以在附图中看到。

非常感谢。

enter image description here

最佳答案

如果你想为此目的使用伪元素,你可以试试这个:

CSS:

.checked {
    background-image:url('http://subtlepatterns.com/patterns/old_map.png');
    background-repeat:repeat;
    width:400px;
    height:auto;
    padding:10px;
    position:relative;
}
.checked div {
    background-image:url(http://i.stack.imgur.com/GIHQn.jpg);
    padding:10px;
}
.checked img {
    max-width:100%;
}
div.checked:after {
    position: absolute;
    content:"";
    bottom: 10px;
    left: 10px;
    height: 10px;
    width: 10px;
    background: inherit;
    z-index:1;
}
div.checked:before {
    position: absolute;
    content:"";
    top: 10px;
    right: 10px;
    height: 10px;
    width: 10px;
    background: inherit;
    z-index:1;
}

HTML:

<div class="checked">
    <div>
        <img src="http://s3.amazonaws.com/fiverr.com/deliveries/45941/large/Cartoons_Caricatures_work_sample_from_pixzyl_1349432179.jpg?1349432179" />
    </div>
</div>

演示:http://jsfiddle.net/lotusgodkk/GCu2D/180/

关于css - 使用 CSS 在容器周围添加花式对 Angular 线边框,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24258286/

相关文章:

CSS3 变换一个元素而不是它的后代

javascript - 不要滚动元素调整大小

javascript - 使用 jQuery 打印 HTML 元素的内容

css - card-img-top 和 card-body 之间的边框

c++ - 你会禁止我设计和使用这个容器吗?

c++ - 用于在稀疏域中设置位和迭代(C++)的快速容器?

html - 仅使用 CSS 的砌体式布局

CSS:1/8长度的圆弧

html - 之前使用的按钮左右边框如何设置?

css - 翻转div时如何去除容器的阴影?