zoukankan      html  css  js  c++  java
  • 背景边框不规则背景

    第一种更好用:

    主要是样式:

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

    效果图:

  • 相关阅读:
    Privilege(特权)
    Access Control Model(访问控制模型)
    nrm 常用命令
    nrm安装完成运行报错 环境变量配置问题
    nrm : 无法加载文件 C:Program Files odejs rm.ps1,因为在此系统上禁止运行脚本。
    ts 实现简单的video播放器 源码: https://github.com/yuhualiang/miProjectTwo
    ts 弹窗组件
    替换字符串中图片的src
    03-05 变量声明
    03-04 变量声明
  • 原文地址:https://www.cnblogs.com/huanghuali/p/6801703.html
Copyright © 2011-2022 走看看