• 背景边框不规则背景


    第一种更好用:

    主要是样式:

    .minjiancs a{ display: block;margin:0 .15rem;border-width:10px;border-style:solid;border-color:transparent;border-image: url(images/icon_border.png) 18 18 round;position: relative;background-color: #f2ebdf}

    下面这种方法不灵活:

    Html代码:

    <!DOCTYPE html>
    <html lang="en">
    
    <head>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width,initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no" />
        <meta content="yes" name="apple-mobile-web-app-capable" />
        <meta content="black" name="apple-mobile-web-app-status-bar-style" />
        <meta content="telephone=no" name="format-detection" />
        <title>Document</title>
        <link rel="stylesheet" type="text/css" href="css/style.css">
    </head>
    
    <body>
        <div class="box1">
            <div class="public_bzhh_title"><span class="left"></span><span class="right"></span><span class="center">通过八字合婚您将获得以下内容</span></div>
        </div>
        <div class="box2">
            <div class="public_bzhh_title"><span class="left"></span><span class="right"></span><span class="center">通过八字合婚您将获得以下内容</span></div>
        </div>
    </body>
    
    </html>

    CSS样式代码:

    * {margin: 0;padding: 0;}
    body{ max-width: 640px; margin: 0 auto; background-color: #f1e8e1; }
    .left{ float: left; }
    .right{ float: right; }
    .box1{ margin: 10px;padding: 10px; background-color:#ffc99f;  }
    .box2{ margin: 10px;padding: 10px; background-color:#fff; }
    .public_bzhh_title{ margin:15px 10px; height: 38px; line-height: 38px;  color: #fff; text-align: center; }
    .public_bzhh_title span{ display: block; }
    .public_bzhh_title span.left,
    .public_bzhh_title span.right{ background: url(../images/title_edge.png) no-repeat; width:8px; height: 38px; background-size: 100% 100%; }
    .public_bzhh_title span.center{background-color: #d23037; overflow: hidden;  }
    .public_bzhh_title span.right{transform: rotateY(180deg); }

    images:

    效果图:

  • 相关阅读:
    泛型
    Java反射及注解
    Java之线程与进程
    线程池
    HashMap、ConcurrentHashMap解析
    基于Opentracing+Jaeger全链路灰度调用链(转载)
    SpringBoot 开发案例之参数传递的正确姿势
    以np.concatenate为主题,谈谈numpy数组按维度合并的问题
    为什么阿里巴巴Java开发手册中强制要求整型包装类对象值用 equals 方法比较?
    [C++面试题]之字符串(转)
  • 原文地址:https://www.cnblogs.com/huanghuali/p/6801703.html
Copyright © 2020-2023  润新知