小编Nav*_*ula的帖子

我的HTML/CSS出了什么问题?

好吧,我正在制作一个导航条的样本,一切都很好,除非嵌套的li悬停在背景中,背景并没有完全覆盖空间.

我的HTML代码如下:

<!DOCTYPE html>
<html>
    <head>
        <link rel="stylesheet" href="style.css" />
        <title>NavBar</title>
    </head>

    <body>
        <div id="nav">
            <ul>
                <li><a href="#">Home</a></li><li>
                <a href="#">About</a></li><li>
                <a href="#">Contact</a>
                   <ul>
                       <li><a href="#">Email</a></li>
                       <li><a href="#">Phone</a></li>
                   </ul>
               </li>
            </ul>
        </div>
    </body>
</html>
Run Code Online (Sandbox Code Playgroud)

我的CSS代码如下:

html, body {
    margin: 100px;
    padding:0px;
    }
#nav {
    margin: 0px;
    padding: 0px;
    background-color: #909090;
    font-familY: Courier;
    font-size: 19pt;
    color: #afc0ff;
    }
#nav ul ul {
    display: none;
    background-color: #909090;
    }
#nav ul li:hover > ul{
    margin: 0px;
    padding:0px;
    display:block;
    position:absolute;
    top: 100%;
    left: …
Run Code Online (Sandbox Code Playgroud)

html css

1
推荐指数
1
解决办法
56
查看次数

C程序控制台在执行后立即退出?

我正在使用Code :: Blocks进行编程,是的,我是初学者,但每次我编写一个程序,它都会在IDE中暂停,但在直接执行时不会暂停.

可能的原因是什么?有人能解释一下吗?

我的代码如下:

#include <stdio.h>
void main()
{
    float length,breadth,Area;
    printf("Enter the value of length and breadth \n\n");
    scanf("%f %f",&length,&breadth);
    printf("You entered length=%f and breadth=%f \n\n",length,breadth);
    Area= length * breadth;
    printf("The area of the rectangle is %f\n\n",Area);
    return 0;
}
Run Code Online (Sandbox Code Playgroud)

c

-1
推荐指数
1
解决办法
1788
查看次数

标签 统计

c ×1

css ×1

html ×1