Home Web Front-end HTML Tutorial Pure CSS DIV rounded corner effect_html/css_WEB-ITnose

Pure CSS DIV rounded corner effect_html/css_WEB-ITnose

Jun 24, 2016 pm 12:32 PM

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>最原始的圆角框</title><style type="text/css">*{margin:0;padding:0;font-size:12px;}.wrapper{width:80%;margin:0 auto;}/*通用样式--容器宽度值*/.sharp{width:30%;margin:20px auto 0;float:left;margin-right:2%;}.sharp .content div{padding:10px;text-indent:2em;}.content{height:180px;}h3{height:29px;line-height:29px;font-size:12px;text-indent:10px;}a:link,a:visited{color:#999;font-weight:bold; text-decoration:none;}a:hover{text-decoration:none; border-bottom:1px orange solid;color:orange;}/*上圆角框通用设置样式,如果要运用多个不同颜色,以下6句不用重新变化--------------------------------*/.b1,.b2,.b3,.b4,.b5,.b6,.b7,.b8{height:1px; font-size:1px; overflow:hidden; display:block;}.b1,.b8{margin:0 5px;}.b2,.b7{margin:0 3px;border-right:2px solid; border-left:2px solid;}.b3,.b6{margin:0 2px;border-right:1px solid; border-left:1px solid;}.b4,.b5{margin:0 1px;border-right:1px solid; border-left:1px solid; height:2px;}.content {border-right:1px solid;border-left:1px solid;overflow:hidden;}/*颜色方案一,蓝色边框----------------------------------------*//*下面第一、二句决定边框颜色,第三句决定背景颜色*//*边框色*/.color1 .b2,.color1 .b3,.color1 .b4,.color1 .b5,.color1 .b6,.color1 .b7,.color1 .content{border-color:#96C2F1;}.color1 .b1,.color1 .b8{background:#96C2F1;}/*背景色*/.color1 .b2,.color1 .b3,.color1 .b4,.color1 .b5,.color1 .b6,.color1 .b7,.color1 .content{background:#EFF7FF;}/*颜色方案二,绿色边框----------------------------------------*//*下面第一、二句决定边框颜色,第三句决定背景颜色*//*边框色*/.color2 .b2,.color2 .b3,.color2 .b4,.color2 .b5,.color2 .b6,.color2 .b7,.color2 .content{border-color:#9BDF70;}.color2 .b1,.color2 .b8{background:#9BDF70;}/*背景色*/.color2 .b2,.color2 .b3,.color2 .b4,.color2 .b5,.color2 .b6,.color2 .b7,.color2 .content{background:#F0FBEB;}/*颜色方案三,绿色边框----------------------------------------*//*下面第一、二句决定边框颜色,第三句决定背景颜色*//*边框色*/.color3 .b2,.color3 .b3,.color3 .b4,.color3 .b5,.color3 .b6,.color3 .b7,.color3 .content{border-color:#BBE1F1;}.color3 .b1,.color3 .b8{background:#BBE1F1;}/*背景色*/.color3 .b2,.color3 .b3,.color3 .b4,.color3 .b5,.color3 .b6,.color3 .b7,.color3 .content{background:#EEFAFF;}/*颜色方案四,绿色边框----------------------------------------*//*下面第一、二句决定边框颜色,第三句决定背景颜色*//*边框色*/.color4 .b2,.color4 .b3,.color4 .b4,.color4 .b5,.color4 .b6,.color4 .b7,.color4 .content{border-color:#E3E197;}.color4 .b1,.color4 .b8{background:#E3E197;}/*背景色*/.color4 .b2,.color4 .b3,.color4 .b4,.color4 .b5,.color4 .b6,.color4 .b7,.color4 .content{background:#FFFFDD;}/*颜色方案五,粉色边框----------------------------------------*//*下面第一、二句决定边框颜色,第三句决定背景颜色*//*边框色*/.color5 .b2,.color5 .b3,.color5 .b4,.color5 .b5,.color5 .b6,.color5 .b7,.color5 .content{border-color:#F8B3D0;}.color5 .b1,.color5 .b8{background:#F8B3D0;}/*背景色*/.color5 .b2,.color5 .b3,.color5 .b4,.color5 .b5,.color5 .b6,.color5 .b7,.color5 .content{background:#FFF5FA;}/*颜色方案六,黄色边框----------------------------------------*//*下面第一、二句决定边框颜色,第三句决定背景颜色*//*边框色*/.color6 .b2,.color6 .b3,.color6 .b4,.color6 .b5,.color6 .b6,.color6 .b7,.color6 .content{border-color:#FFCC00;}.color6 .b1,.color6 .b8{background:#FFCC00;}/*背景色*/.color6 .b2,.color6 .b3,.color6 .b4,.color6 .b5,.color6 .b6,.color6 .b7,.color6 .content{background:#FFFFF7;}</style></head><body><div class="wrapper">    <!--风格一,只需要变换一个CLASS就可以换一种颜色-->    <div class="sharp color1">        <b class="b1"></b><b class="b2"></b><b class="b3"></b><b class="b4"></b>         <div class="content">                <h3>纯css圆角框换肤方案一</h3>              <div>这是最基本的圆角框,无图片,四个圆角全部采用标签绘制,兼容所有浏览器,无HACK,使用时只需添加一个class = " color1 "即可,下面的所有颜色方案你可以灵活自定义。                  <br/><br/><br/><br/><br/>              </div>        </div>        <b class="b5"></b><b class="b6"></b><b class="b7"></b><b class="b8"></b>        </div>    <!--风格二,只需要变换一个CLASS就可以换一种颜色-->    <div class="sharp color2">        <b class="b1"></b><b class="b2"></b><b class="b3"></b><b class="b4"></b>         <div class="content">                <h3>纯css圆角框换肤方案二</h3>              <div>class = " color2 "                  <br/><br/><br/><br/><br/><br/><br/><br/>              </div>        </div>        <b class="b5"></b><b class="b6"></b><b class="b7"></b><b class="b8"></b>        </div>    <!--风格三,只需要变换一个CLASS就可以换一种颜色-->    <div class="sharp color3">        <b class="b1"></b><b class="b2"></b><b class="b3"></b><b class="b4"></b>         <div class="content">                <h3>纯css圆角框换肤方案三</h3>              <div>class = " color3 "                  <br/><br/><br/><br/><br/><br/><br/><br/>              </div>        </div>        <b class="b5"></b><b class="b6"></b><b class="b7"></b><b class="b8"></b>        </div>        <!--风格四,只需要变换一个CLASS就可以换一种颜色-->    <div class="sharp color4">        <b class="b1"></b><b class="b2"></b><b class="b3"></b><b class="b4"></b>         <div class="content">              <h3>纯css圆角框换肤方案四</h3>            <div>class = " color4 "                  <br/><br/><br/><br/><br/><br/><br/><br/>            </div>        </div>        <b class="b5"></b><b class="b6"></b><b class="b7"></b><b class="b8"></b>        </div>        <!--风格四,只需要变换一个CLASS就可以换一种颜色-->    <div class="sharp color5">        <b class="b1"></b><b class="b2"></b><b class="b3"></b><b class="b4"></b>         <div class="content">              <h3>纯css圆角框换肤方案五</h3>            <div>class = " color5 "                  <br/><br/><br/><br/><br/><br/><br/><br/>            </div>        </div>        <b class="b5"></b><b class="b6"></b><b class="b7"></b><b class="b8"></b>        </div>        <!--风格四,只需要变换一个CLASS就可以换一种颜色-->    <div class="sharp color6">        <b class="b1"></b><b class="b2"></b><b class="b3"></b><b class="b4"></b>         <div class="content">              <h3>纯css圆角框换肤方案六</h3>            <div>class = " color6 "                  <br/><br/><br/><br/><br/><br/><br/><br/>            </div>        </div>        <b class="b5"></b><b class="b6"></b><b class="b7"></b><b class="b8"></b>        </div></div></body></html>
Copy after login

 

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

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Is HTML easy to learn for beginners? Is HTML easy to learn for beginners? Apr 07, 2025 am 12:11 AM

HTML is suitable for beginners because it is simple and easy to learn and can quickly see results. 1) The learning curve of HTML is smooth and easy to get started. 2) Just master the basic tags to start creating web pages. 3) High flexibility and can be used in combination with CSS and JavaScript. 4) Rich learning resources and modern tools support the learning process.

The Roles of HTML, CSS, and JavaScript: Core Responsibilities The Roles of HTML, CSS, and JavaScript: Core Responsibilities Apr 08, 2025 pm 07:05 PM

HTML defines the web structure, CSS is responsible for style and layout, and JavaScript gives dynamic interaction. The three perform their duties in web development and jointly build a colorful website.

Understanding HTML, CSS, and JavaScript: A Beginner's Guide Understanding HTML, CSS, and JavaScript: A Beginner's Guide Apr 12, 2025 am 12:02 AM

WebdevelopmentreliesonHTML,CSS,andJavaScript:1)HTMLstructurescontent,2)CSSstylesit,and3)JavaScriptaddsinteractivity,formingthebasisofmodernwebexperiences.

What is an example of a starting tag in HTML? What is an example of a starting tag in HTML? Apr 06, 2025 am 12:04 AM

AnexampleofastartingtaginHTMLis,whichbeginsaparagraph.StartingtagsareessentialinHTMLastheyinitiateelements,definetheirtypes,andarecrucialforstructuringwebpagesandconstructingtheDOM.

Gitee Pages static website deployment failed: How to troubleshoot and resolve single file 404 errors? Gitee Pages static website deployment failed: How to troubleshoot and resolve single file 404 errors? Apr 04, 2025 pm 11:54 PM

GiteePages static website deployment failed: 404 error troubleshooting and resolution when using Gitee...

How to use CSS3 and JavaScript to achieve the effect of scattering and enlarging the surrounding pictures after clicking? How to use CSS3 and JavaScript to achieve the effect of scattering and enlarging the surrounding pictures after clicking? Apr 05, 2025 am 06:15 AM

To achieve the effect of scattering and enlarging the surrounding images after clicking on the image, many web designs need to achieve an interactive effect: click on a certain image to make the surrounding...

How to implement adaptive layout of Y-axis position in web annotation? How to implement adaptive layout of Y-axis position in web annotation? Apr 04, 2025 pm 11:30 PM

The Y-axis position adaptive algorithm for web annotation function This article will explore how to implement annotation functions similar to Word documents, especially how to deal with the interval between annotations...

HTML, CSS, and JavaScript: Essential Tools for Web Developers HTML, CSS, and JavaScript: Essential Tools for Web Developers Apr 09, 2025 am 12:12 AM

HTML, CSS and JavaScript are the three pillars of web development. 1. HTML defines the web page structure and uses tags such as, etc. 2. CSS controls the web page style, using selectors and attributes such as color, font-size, etc. 3. JavaScript realizes dynamic effects and interaction, through event monitoring and DOM operations.

See all articles