• 通过相对定位和绝对定位实现四个圆角图片的方法


    <!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=gb2312" />
    <title>无标题文档</title>
    <style type="text/css">
    .border
    {width:500px; position:relative; font-size:12px;}
    .lt
    { background:url(1.jpg) no-repeat; left:0; top:0; position:absolute; width:7px; height:7px;}
    .rt
    { background:url(2.jpg) no-repeat; right:0; top:0; position:absolute; width:7px; height:7px;}
    .lb
    { background:url(4.jpg) no-repeat; left:0; bottom:0;_bottom:-7px; position:absolute; width:7px; height:7px;}
    .rb
    { background:url(3.jpg) no-repeat; right:0; bottom:0;_bottom:-7px; position:absolute; width:7px; height:7px;}
    .content
    {font-size:14px; border:1px solid #a8acad;}
    </style>
    </head>

    <body>
    <div class="border">
    <div class="lt"></div>
    <div class="rt"></div>
    <div class="lb"></div>
    <div class="rb"></div>
    <div class="content">This is <div style="font-size:12px;">content.</div><br />
    <br />
    <br />
    <br />
    <br />
    <br />
    </div>
    </div>
    </body>
    </html>

    代码:

  • 相关阅读:
    sublime text3中html的使用
    WEB如何入门?各种渗透攻击如何入门?
    考思科认证NA过程的学习笔记
    HTML URL 编码(学习笔记)
    学习HTML过程中的笔记
    必学
    playfair密码
    二三级计算机考试时间
    DAY 135 VUE
    DAY 134 RBAC
  • 原文地址:https://www.cnblogs.com/superfeeling/p/2173664.html
Copyright © 2020-2023  润新知