自适应网站效果
代码语言:html
所属分类:布局界面
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <link rel='stylesheet' href='https://fonts.googleapis.com/css?family=Lato&display=swap'> <style> body { margin: 0; } .background { align-items: center; background: #524fae; display: flex; height: 500vh; justify-content: center; padding-top: 150px; width: 100vw; } .Header { align-items: center; background: white; border-bottom-left-radius: 30px; border-bottom-right-radius: 30px; display: flex; height: 100px; justify-content: center; position: fixed; text-align: center; top: 0; width: 100%; z-index: 10; } .Header.has-mobile-button .MobileNav-trigger { display: flex; } .Header-inner { display: flex; justify-content: space-between; transition: height 0.4s ease; width: 80vw; } .Header .logo { align-self: center; display: flex; height: 80px; margin-right: 60px; width: 200px; } .Header-nav { display: flex; flex-wrap: wrap; height: 0; justify-content: space-between; max-height: 105px; max-width: 940px; overflow: hidden; width: 100%; } .Header-nav-item { align-items: center; align-self: center; color: darkblue; display: flex; flex-shrink: 0; font-family: Lato, sans-serif; font-size: 20px; font-weight: bold; height: 100%; line-height: 32px; margin: 0 40px; transition: font-size 0.4s ease, padding 0.4s ease; } .Header-nav-item:last-child { margin-right: 0; } .Header-nav-item a { color: black; text-decoration: none; } .Header-nav-item:hover { color: darkblue !important; } .Header-nav:hover .Header-nav-item { color: rgba(0, 0, 139, 0.5); } @media screen and (min-width: 481px) { .Header-nav { height: auto; } } .container { align-content: flex-start; display: flex; flex-direction: column; height: 100%; justify-content: space-around; width: 80vw; } .container .card { background: white; background-position: center; background-size: cover; border-radius: 10px; height: 50vh; margin-bottom: 10%; widt.........完整代码请登录后点击上方下载按钮下载查看
网友评论0