qq_45735316 2020-04-08 16:47 采纳率: 94.1%
浏览 202
已采纳

要怎样改才能达到上面这种效果?那个橙色的边框我死活都弄不出来

设计逻辑是一个有背景图的div里面放另一个div里面是无序列表吗?实在不是很懂设计框架

图片说明
图片说明

<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8" />
        <title>盒子模型</title>
        <style>
            *{
                margin:0;
                padding: 0;
            }

            .div1{
                background-image:url(img/bgimage.png);
                background-repeat: no-repeat;
                padding-top:60px;
                padding-left:15px;
                margin-top: 0px;
                border-left: 15px;
                border-color:orange;
            }
            div.div2{
                border-color: orange;
                width:200px;
                border-left: 15px;
                margin-left: 5px;
                margin-top: 60px;
                margin-bottom: 10px;
            }
            li{
                width:100px;
                height:20px;
                line-height:20px;
                color:orange;
                font-family: "微软雅黑";
                font-size:15px ;
                font-weight:bold;
                list-style-type: none;
                list-style-position: inside;
                padding-left: 15px;
                background-color: forestgreen;
                border:1px dashed;
                border-color:#ccc ;

            }

            li:hover{
                /*光标落在标签上时*/
                font-size: 18px;
            }
        </style>
    </head>
    <body>
        <div class="div1">
            <div class="div2">
                <ul>
                    <li><a style="display: block;">图书分类</a></li>
                    <li><a style="display: block;">人文社科</a></li>
                    <li><a style="display: block;">历史古籍</a></li>
                    <li><a style="display: block;">哲学宗教</a></li>
                    <li><a style="display: block;">社会科学</a></li>
                    <li><a style="display: block;">科普百科</a></li>
                </ul>
            </div>
        </div>
    </body>
</html>

  • 写回答

1条回答 默认 最新

  • franzhong 2020-04-08 17:13
    关注
    ul{
            border-left:10px solid orange;
     }
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥100 嵌入式系统基于PIC16F882和热敏电阻的数字温度计
  • ¥15 cmd cl 0x000007b
  • ¥20 BAPI_PR_CHANGE how to add account assignment information for service line
  • ¥500 火焰左右视图、视差(基于双目相机)
  • ¥100 set_link_state
  • ¥15 虚幻5 UE美术毛发渲染
  • ¥15 CVRP 图论 物流运输优化
  • ¥15 Tableau online 嵌入ppt失败
  • ¥100 支付宝网页转账系统不识别账号
  • ¥15 基于单片机的靶位控制系统