播种器菜鸡1号 2023-04-24 19:27 采纳率: 81.8%
浏览 81
已结题

html+css,想在more details标签下面加一个导航栏下拉栏(hobby,subject 和experience)要怎么改啊


<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8" />
        <title>This is about me</title>
        <link rel="stylesheet" type="text/css" href="style.css">
        <style>
        body {
            margin: 0;
            padding: 0;
            background: url("picture/background.jpg") no-repeat;
            background-size: cover;
        }
    </style>
    </head>
    <body>
        <div class="page">
            <div class="nav">
                <ul class="l">
                    <a href="Introduction.html"><li>Home Page</li></a>
                    <a href="Details.html"><li>More details</li></a>
                         <ul>
                           <li><a href="#">hobby</a></li>
                           <li><a href="#">subject</a></li>
                           <li><a href="#">experience</a></li>
                        </ul>
                    <a href="ly.html"><li>Want to chat?</li></a>
                </ul>
            </div>
            <div class="mid">            
                <div class="left l">
                    <p class="metitle">Me</p>                    
                    <div class="me">
                        <img src="picture/me.jpg" alt="">
                        <p class="informationtitle">Basic information</p>
                        <p><b>Name:</b>XXX</p>
                        <p><b>Phone Number:</b>1??****???6</p>
                        <p><b>Email:</b>xxxxxxxxxx@qq.com</p>
                        <p><b>Habit:</b>Music</p>
                    </div>
                </div>
                <div class="book">
                    <img src="picture/book.jpg" alt="">
                </div>
                <div class="right l">
                    <p class="introductiontitle">Introduction</p>                    
                    <div class="wz">                        
                        <p>待补充</p>
                    </div>
                </div>
            </div>
            <div class="foot">xxx</div>
        </div>
    </body>
</html>


@charset "utf-8";
*{
    margin: 0;
    padding: 0;
    border: 0;
    outline: 0;
}
li{
    list-style: none;
}
a{
    color: #000;
    text-decoration: none;
}
.l{
    float: left;
}
.r{
    float: right;
}
.page{
    width: 1600px;
    margin: 0 auto;
    background-color: rgba(255, 255, 255, 0.272);
    overflow: hidden;
}
.nav{
    width: 100%;
    background-color: #f97c0084;
    overflow: hidden;
}

.nav ul{
    width: 720px;
    overflow: hidden;
    margin: 5px 10px 5px 0;
}
.nav ul li{
    width: 120px;
    text-align: center;
    position: relative;
    line-height: 50px;
    font-size: 14px;
    color: rgb(255, 255, 255);
    float: left;
}
.nav ul li:hover{
    background-color: #f97c004c;
}
.nav ul li:hover ul {
    display: block;
}
.mid{
    width: 100%;
    box-sizing: border-box;
    padding: 20px;
    overflow: hidden;
}
.banner{
    width: 100%;
    height: 750px;
    overflow: hidden;
    margin-bottom: 15px;
}
.detailsbanner{
    width: 100%;
    height: 400px;
    overflow: hidden;
    margin-bottom: 10px;
}
.banner img{
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.left{
    width: 300px;
    margin-right: 40px;
}
.right{
    width: 1220px;
}
.metitle{
    width: 100%;
    line-height: 40px;
    text-indent: 3.5em;
    background-color: #f9bb0078;
    color: rgb(255, 255, 255);
    font-size: 36px;
    margin-bottom: 20px;
}
.informationtitle{
    width: 100%;
    line-height: 40px;
    text-indent: 1em;
    background-color: #f9bb0078;
    color: rgb(255, 255, 255);
    font-size: 24px;
}
.introductiontitle{
    width: 100%;
    line-height: 40px;
    text-indent: 12em;
    background-color: #f9bb0078;
    color: rgb(254, 254, 254);
    font-size: 36px;
    margin-bottom: 20px;
}
.jj{
    width: 260px;
    margin: 0 auto 20px;
}
.me img{
    display: block;
    width: 240px;
    height: 240px;
    box-sizing: border-box;
    border-radius: 1/2;
    border: 2px solid #f9bb0078;
    margin: 0 auto 20px;
}
.dp img{
    display: block;
    width: 240px;
    height: 400px;
    box-sizing: border-box;
    border-radius: 1/2;
    border: 2px solid #f9bb0078;
    margin: 0 auto 20px;
}
.book img{
    display: block;
    width: 1200px;
    height: 300px;
    box-sizing: border-box;
    border-radius: 1/2;
    margin: 0 auto 20px;
}
.jj p{
    line-height: 26px;
    margin-bottom: 5px;
}
.foot{
    width: 100%;
    background-color: #f97c0084;
    text-align: center;
    line-height: 50px;
    font-size: 14px;
    color: #FFF;
}

  • 写回答

3条回答 默认 最新

  • Yirujet 2023-04-24 20:12
    关注
    
    
    ```html
     
    <!DOCTYPE html>
    <html>
        <head>
            <meta charset="utf-8" />
            <title>This is about me</title>
            <link rel="stylesheet" type="text/css" href="style.css">
            <style>
            body {
                margin: 0;
                padding: 0;
                background: url("picture/background.jpg") no-repeat;
                background-size: cover;
            }
        </style>
        </head>
        <body>
            <div class="page">
                <div class="nav">
                    <ul>
                        <li>
                            <a href="Introduction.html"><span>Home Page</span></a>
                        </li>
                        <li class="detail-wrapper">
                            <a href="Details.html">
                                <span>More details</span>
                                <ul class="more-details">
                                    <li><a href="#">hobby</a></li>
                                    <li><a href="#">subject</a></li>
                                    <li><a href="#">experience</a></li>
                                 </ul>
                            </a>
                        </li>
                        <li><a href="ly.html"><span>Want to chat?</span></a></li>
                    </ul>
                </div>
                <div class="mid">            
                    <div class="left l">
                        <p class="metitle">Me</p>                    
                        <div class="me">
                            <img src="picture/me.jpg" alt="">
                            <p class="informationtitle">Basic information</p>
                            <p><b>Name:</b>XXX</p>
                            <p><b>Phone Number:</b>1??****???6</p>
                            <p><b>Email:</b>xxxxxxxxxx@qq.com</p>
                            <p><b>Habit:</b>Music</p>
                        </div>
                    </div>
                    <div class="book">
                        <img src="picture/book.jpg" alt="">
                    </div>
                    <div class="right l">
                        <p class="introductiontitle">Introduction</p>                    
                        <div class="wz">                        
                            <p>待补充</p>
                        </div>
                    </div>
                </div>
                <div class="foot">xxx</div>
            </div>
        </body>
    </html>
     
    
    
    
    
    ```css
    
     
    @charset "utf-8";
    *{
        margin: 0;
        padding: 0;
        border: 0;
        outline: 0;
    }
    li{
        list-style: none;
    }
    a{
        color: #000;
        text-decoration: none;
    }
    .l{
        float: left;
    }
    .r{
        float: right;
    }
    .page{
        width: 1600px;
        margin: 0 auto;
        background-color: rgba(255, 255, 255, 0.272);
        /* overflow: hidden; */
    }
    .nav{
        width: 100%;
        background-color: #f97c0084;
        /* overflow: hidden; */
    }
     
    .nav ul{
        width: 720px;
        /* overflow: hidden; */
        margin: 5px 10px 5px 0;
        display: flex;
        justify-content: flex-start;
        align-items: flex-start;
        height: 50px;
    }
    .nav ul li{
        width: 120px;
        text-align: center;
        position: relative;
        line-height: 50px;
        font-size: 14px;
        color: rgb(255, 255, 255);
        /* float: left; */
    }
    .nav ul li:hover{
        background-color: #f97c004c;
    }
    .nav ul li:hover ul {
        display: block;
    }
    .mid{
        width: 100%;
        box-sizing: border-box;
        padding: 20px;
        overflow: hidden;
    }
    .banner{
        width: 100%;
        height: 750px;
        overflow: hidden;
        margin-bottom: 15px;
    }
    .detailsbanner{
        width: 100%;
        height: 400px;
        overflow: hidden;
        margin-bottom: 10px;
    }
    .banner img{
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
    .left{
        width: 300px;
        margin-right: 40px;
    }
    .right{
        width: 1220px;
    }
    .metitle{
        width: 100%;
        line-height: 40px;
        text-indent: 3.5em;
        background-color: #f9bb0078;
        color: rgb(255, 255, 255);
        font-size: 36px;
        margin-bottom: 20px;
    }
    .informationtitle{
        width: 100%;
        line-height: 40px;
        text-indent: 1em;
        background-color: #f9bb0078;
        color: rgb(255, 255, 255);
        font-size: 24px;
    }
    .introductiontitle{
        width: 100%;
        line-height: 40px;
        text-indent: 12em;
        background-color: #f9bb0078;
        color: rgb(254, 254, 254);
        font-size: 36px;
        margin-bottom: 20px;
    }
    .jj{
        width: 260px;
        margin: 0 auto 20px;
    }
    .me img{
        display: block;
        width: 240px;
        height: 240px;
        box-sizing: border-box;
        border-radius: 1/2;
        border: 2px solid #f9bb0078;
        margin: 0 auto 20px;
    }
    .dp img{
        display: block;
        width: 240px;
        height: 400px;
        box-sizing: border-box;
        border-radius: 1/2;
        border: 2px solid #f9bb0078;
        margin: 0 auto 20px;
    }
    .book img{
        display: block;
        width: 1200px;
        height: 300px;
        box-sizing: border-box;
        border-radius: 1/2;
        margin: 0 auto 20px;
    }
    .jj p{
        line-height: 26px;
        margin-bottom: 5px;
    }
    .foot{
        width: 100%;
        background-color: #f97c0084;
        text-align: center;
        line-height: 50px;
        font-size: 14px;
        color: #FFF;
    }
    
    .detail-wrapper {
        position: relative;
        overflow: hidden;
        height: 50px;
    }
    
    .detail-wrapper:hover {
        overflow: visible;
        height: 200px;
        background-color: rgba(249, 141, 0, 1);
    }
    
    .detail-wrapper .more-details {
        /* position: absolute; */
        display: flex;
        flex-direction: column;
        width: 120px;
    }
    

    img

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(2条)

报告相同问题?

问题事件

  • 已结题 (查看结题原因) 4月24日
  • 已采纳回答 4月24日
  • 创建了问题 4月24日

悬赏问题

  • ¥15 使用yolov5-7.0目标检测报错
  • ¥15 对于这个问题的解释说明
  • ¥200 询问:python实现大地主题正反算的程序设计,有偿
  • ¥15 smptlib使用465端口发送邮件失败
  • ¥200 总是报错,能帮助用python实现程序实现高斯正反算吗?有偿
  • ¥15 对于squad数据集的基于bert模型的微调
  • ¥15 为什么我运行这个网络会出现以下报错?CRNN神经网络
  • ¥20 steam下载游戏占用内存
  • ¥15 CST保存项目时失败
  • ¥20 java在应用程序里获取不到扬声器设备