Home >Web Front-end >HTML Tutorial >[Recommended] Make div css rounded corners_html/css_WEB-ITnose

[Recommended] Make div css rounded corners_html/css_WEB-ITnose

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-06-24 12:30:331156browse


"Try not to round the corners, you need to cut the picture" "This design code is difficult to implement" and so on. Yesterday I saw on the Internet that you can design the effect of rounded corners using only code. ~ Share with everyone~

First look at the style sheet file:
.b1 {height:1px; font-size:1px; overflow:hidden; display:block; background:#000; margin:0 5px;}
.b2 {height:1px; font-size:1px; overflow:hidden; display:block; background:#fff;
border-right:2px solid #000; border-left:2px solid #000; margin:0 3px;}
.b3 {height:1px; font-size:1px; overflow:hidden; display:block; background:#fff;
border-right:1px solid #000; border-left:1px solid #000; margin:0 2px;}
.b4 {height:2px; font-size:1px; overflow:hidden; display:block; background:#fff;
border-right :1px solid #000; border-left:1px solid #000; margin:0 1px;}

Then look at the page code:


Of course you can also use other tags

or etc., it should also be possible

Between the above two sentences Add a left and right border content
This is the effect:

posted @ 2009-05-17 17:58 mokliu Read (...) Comment (... ) Edit Collection

Statement:
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