zoukankan      html  css  js  c++  java
  • css3边框,文本

    css3边框属性:

    border-radius圆角  (浏览器:Internet Explorer 9+ 、Firefox、Chrome 以及 Safari )

    box-shadow盒阴影  (浏览器:Internet Explorer 9+ 、Firefox、Chrome 以及 Safari )

    border-image边框背景(浏览器:Firefox、Chrome、Safari 5 以及更老的版本需要前缀 -webkit-,Opera需要前缀-o-,IE11)

    text-shadow文本阴影(浏览器:Internet Explorer 10、Firefox、Chrome、Safari 以及 Opera )

    <style>
            div{
                300px;
                height:200px;
                background:green;
                border-radius: 10px 20px;/*左上和右下是10px,右上和左下是20px*/
                /*水平 垂直 模糊度 阴影的颜色 insert是内部阴影*/
                box-shadow:10px 5px 5px red inset;
                text-shadow: 5px 5px 5px blue;
                text-align: center;
                line-height: 200px;
            }
        </style>

    边框背景:

    <style>
        div{
            300px;
            height:200px;
            background:green;
            border:20px solid red;
            border-image-source: url(img/2.png);/*选择图片作为边框背景*/
            border-image-slice: 70;/*切割图片*/
            border-image-repeat: round;/*stretch拉伸,repeat平铺,推荐使用round铺满*/

      /*border-image:url(img/2.png) 70 round;*/
        }
        </style>

  • 相关阅读:
    absolute之后居中宽度自适应
    定位网页元素(5)
    浮动(4)
    Android的方法和属性(1)
    Activity步骤
    JSP的指令
    边框和边距(3)
    计算机快件键
    字体、文本、背景、列表样式和超链接(2)
    c/s和b/s的区别
  • 原文地址:https://www.cnblogs.com/qyuan/p/9419683.html
Copyright © 2011-2022 走看看