css3实现圆角效果

来源:互联网 发布:java json解析框架 编辑:程序博客网 时间:2024/06/07 02:26

以下为圆角各种情况的代码;

<!DOCTYPE html>

<html>
    <head>
        <meta charset="UTF-8">
        <title></title>
        <script src="js/jquery-1.9.1.min.js"></script>
        <script>
            
        </script>
    </head>
    <style>
        div{margin-bottom: 5px;}
        .bgradio{width:100px;height: 100px;background: red;border-radius: 5px;}
        .boradio{width:100px;height: 100px;border:1px solid #ccc;border-radius: 5px;}
        .imgradio{width:100px;height: 100px;border-radius: 5px;background: url(images/wall1.jpg);}
        .topradio{width:100px;height: 100px;border-radius: 5px 5px 0 0;border: 1px solid #ccc;}
        .botpradio{width:100px;height: 100px;border-radius: 0 0 5px 5px;border: 1px solid #ccc;}
    </style>
    <!--
        有背景颜色   有边框  有背景图片  指定每个圆角
    -->
    <body>
        <!--有背景颜色的圆角-->
        <div class="bgradio"></div>
        <!--有边框的圆角-->
        <div class="boradio"></div>
        <!--有背景图片的圆角-->
        <div class="imgradio"></div>
        <!--顶端为圆角的-->
        <div class="topradio"></div>
        <!--底端为圆角的-->
        <div class="botpradio"></div>
    </body>

</html>

我自己也是刚学习不长时间;css3圆角虽然简单;但用途不少,希望可以帮到你们;

0 0