国产精品天干天干,亚洲毛片在线,日韩gay小鲜肉啪啪18禁,女同Gay自慰喷水

歡迎光臨散文網(wǎng) 會(huì)員登陸 & 注冊(cè)

CSS原生,響應(yīng)式,導(dǎo)航欄,附源碼

2023-02-18 22:57 作者:Eran舊夏天  | 我要投稿


576px及以上
1024xp及以上
手機(jī)端

<!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>Document</title>

? ?<link rel="stylesheet" href="common.css" />

? ?<style>

? ? ?.is-open {

? ? ? ?height: 6.8em;

? ? ?}

? ? ?.is-close {

? ? ? ?height: 0;

? ? ?}

? ? ?nav * {

? ? ? ?color: white;

? ? ?}

? ? ?nav {

? ? ? ?background-color: rgb(23, 154, 158);

? ? ?}

? ? ?a:hover {

? ? ? ?text-decoration: none;

? ? ?}


? ? ?.icon-1 {

? ? ? ?display: inline-block;

? ? ? ?width: 0.6em;

? ? ? ?height: 0.6em;

? ? ? ?border: 3px solid white;

? ? ? ?border-radius: 0.25em;

? ? ? ?transform: rotate(45deg);

? ? ?}


? ? ?.icon-2 {

? ? ? ?display: inline-block;

? ? ? ?width: 0.6em;

? ? ? ?height: 0.6em;

? ? ? ?border: 3px solid skyblue;

? ? ? ?border-radius: 0.25em;

? ? ? ?transform: rotate(45deg);

? ? ?}


? ? ?nav {

? ? ? ?display: flex;

? ? ? ? ?color: rgba(255,215,100);

? ? ? ?

? ? ? ?flex-direction: column;

? ? ? ?text-align: center;

? ? ?}

? ? ?.menu > div:first-child {

? ? ? ?border-top: 2px solid white;

? ? ?}u

? ? ?.menu > div + div {

? ? ? ?border-top: 2px solid white;

? ? ?}

? ? ?.menu {

? ? ? ?border-left: 1px solid white;

? ? ? ?overflow: hidden;

? ? ? ?transition: all 300ms ease-in-out;

? ? ?}

? ? ?@media (min-width: 576px) {

? ? ? ?nav {

? ? ? ? ?display: flex;

? ? ? ? ?flex-direction: row;

? ? ? ?}

? ? ? ?nav > div:first-child {

? ? ? ? ?align-self: center;

? ? ? ? ?flex: 1;

? ? ? ?}


? ? ? ?.menu {

? ? ? ? ?flex: 2;

? ? ? ? ?overflow: hidden;

? ? ? ? ?align-self: center;

? ? ? ?}

? ? ? ?.menu > div:first-child {

? ? ? ? ?border-top: none;

? ? ? ?}

? ? ? ?.menu > div + div {

? ? ? ? ?border-top: none;

? ? ? ?}

? ? ? ?.menu a:hover {

? ? ? ? ?text-decoration: underline;

? ? ? ?}

? ? ? ?.is-open {

? ? ? ? ?height: 6em;

? ? ? ?}

? ? ? ?a:hover {

? ? ? ? ?color: rgba(255,215,100);

? ? ? ?}

? ? ?}


? ? ?@media (min-width: 1024px) {

? ? ? ?nav {

? ? ? ? ?display: flex;

? ? ? ? ?flex-direction: row;

? ? ? ? ?padding-left: 2em;

? ? ? ?}

? ? ? ?nav > div:first-child {

? ? ? ? ?flex: none;

? ? ? ?}

? ? ? ?.menu {

? ? ? ? ?flex: 1;

? ? ? ? ?display: flex;

? ? ? ? ?flex-direction: row;

? ? ? ? ?justify-content: space-around;

? ? ? ? ?border-left: none;

? ? ? ? ?align-items: center;

? ? ? ? ?overflow: hidden;

? ? ? ?}

? ? ? ?.menu > div:first-child {

? ? ? ? ?border-top: none;

? ? ? ?}

? ? ? ?.menu > div + div {

? ? ? ? ?border-top: none;

? ? ? ?}

? ? ? ?.is-open {

? ? ? ? ?height: 3em;

? ? ? ?}

? ? ?}

? ?</style>

?</head>

?<body>

? ?<nav>

? ? ?<div>

? ? ? ?<a href="#" id="icon-btn"

? ? ? ? ?>Eran <sup><small>studio</small></sup> <span class="icon-1"></span

? ? ? ? ?><span class="icon-2"></span

? ? ? ?></a>

? ? ?</div>

? ? ?<div class="menu is-open">

? ? ? ?<div><a href="">AboutUs</a></div>

? ? ? ?<div><a href="">Blog</a></div>

? ? ? ?<div><a href="">Share</a></div>

? ? ? ?<div><a href="">Services</a></div>

? ? ? ?<div><a href="">Contact</a></div>

? ? ?</div>

? ?</nav>

?</body>

?<script>

? ?let icon_btn = document.getElementById('icon-btn')

? ?let menu = icon_btn.parentElement.nextElementSibling

? ?icon_btn.addEventListener('click', function () {

? ? ?if (menu.classList.contains('is-open')) {

? ? ? ?menu.setAttribute('class', 'menu is-close')

? ? ?} else {

? ? ? ?menu.setAttribute('class', 'menu is-open')

? ? ?}

? ?})

?</script>

</html>


html,

h1,

h2,

h3,

h4,

h5,

h6,

span,

div,

p,

ul,

li {

?margin: 0;

?padding: 0;

}

:root {

?font-size: (1vw+0.3em);

}

ul {

?list-style: none;

}

a {

?text-decoration: none;

}


a:hover {

?text-decoration: underline;

}

.container {

?width: 100%;

}

@media (min-width: 48em) {

?.container {

? ?max-width: 48em;

?}

}

@media (min-width: 64em) {

?.container {

? ?max-width: 64em;

?}

}

@media (min-width: 90em) {

?.container {

? ?max-width: 48em;

?}

}

@media (min-width: 48em) {

?.container {

? ?max-width: 48em;

?}

}

@media (min-width: 90em) {

?.container {

? ?max-width: 90em;

?}

}

.text-blueviolet {

?color: blueviolet;

}

.mx-auto {

?margin: 0 auto;

}

.flex {

?display: flex;

}

.flex-1 {

?flex: 1;

}

.justify-around {

?justify-content: space-around;

}

.justify-between {

?justify-content: space-between;

}

.justify-envnly {

?justify-content: space-evenly;

}

.justify-start {

?justify-content: start;

}



CSS原生,響應(yīng)式,導(dǎo)航欄,附源碼的評(píng)論 (共 條)

分享到微博請(qǐng)遵守國家法律
新平| 鹰潭市| 江西省| 临邑县| 海林市| 咸丰县| 桐柏县| 阜宁县| 尤溪县| 铜鼓县| 庆云县| 运城市| 桓仁| 鹤山市| 上饶市| 新邵县| 岱山县| 清流县| 丰顺县| 乌兰察布市| 西充县| 蓝田县| 浦城县| 虹口区| 新巴尔虎右旗| 南乐县| 旅游| 西安市| 合水县| 宁波市| 花莲县| 溧水县| 库尔勒市| 渑池县| 绥德县| 库伦旗| 东城区| 东方市| 阿勒泰市| 静宁县| 天津市|