Use css border-image to achieve zigzag shape

巴扎黑
Release: 2017-08-05 12:56:34
Original
3085 people have browsed it

How to implement such a style in css:

Solution:

  • The technology needed here is border-image To use it flexibly, you first need a picture. The one I selected here is like this. In subsequent pictures, you can use this to change the color of the circle to change the color of the sawtooth:

The bottom is transparent and square. The PS screenshot is as follows:

Okay, let’s start the real code:

html:


Copy after login

css:


.ele-card{ height: 130px; width: 70%; position: absolute; z-index: 99; top: 26%; left: 50%; margin-left: -35%; background: #fee94e; }.ele-card-borderImage{ border-top: 15px solid transparent; border-image: url(../img/order_border-min.png) 111 44 round; width: 100%; position: relative; top: -4px; }
Copy after login

The above is the detailed content of Use css border-image to achieve zigzag shape. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!