Mobile Navbar list-style-type:property descendant selectors

 /*

Block:Top Bottom Margin Respected
Inline:Top Bottom Margin Not Respected
Mobile Navbar
list-style-type:property
descendant selectors
*/

index.html:


<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>CSS Tutorial</title>    
    <link rel="stylesheet" href="styles.css">

   
</head>
<body >
    <ul>
        <li><a href="#">home</a></li>
        <li><a href="#">about</a></li>
        <li><a href="#">product</a></li>
        <li><a href="#">contact us</a></li>
    </ul>  
</body>
</html>

CSS:

/*
Block:Top Bottom Margin Respected
Inline:Top Bottom Margin Not Respected
Mobile Navbar
list-style-type:property
descendant selectors
*/

*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body {
    font-family: Verdana, Geneva, Tahoma, sans-serif;
}
ul li {
    list-style-type: none;
}
ul li a {
    text-decoration: none;
    text-transform:capitalize;
    letter-spacing: 2px;
    background: #222;
    color: #f15025;
    display: block;
    padding: 10px 10px;
    margin: 10px;
}


评论

此博客中的热门博文

通过Graphql成功地查询Contentful,以便在我的gatsby项目中访问和显示图像

Oracle忘了保存,Oracle Cloud甲骨文云服务器忘记SSH秘钥或未设置Public key的解决办法...

Nginx【Docker系列】一个反向代理神器——Nginx Proxy Manager