bootstrap布局产品服务页面自适应首页效果代码
代码语言:html
所属分类:布局界面
代码描述:bootstrap布局产品服务页面自适应首页效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta name="keywords" content=""> <meta name="description" content=""> <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"> <link type="text/css" rel="stylesheet" href="//repo.bfw.wiki/bfwrepo/css/bootstrap.3.3.4.css"> <style> .mr-1 { margin-right: 5px !important; } .ml-1 { margin-left: 5px !important; } body { font-family: 'Microsoft Yahei', Arial, sans-serif; font-size: 14px; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; color: #4b4d4e; background-color: #fff; margin: 0; line-height: 1.7em; } a { text-decoration: none; color: #34495e; } img { border: none; } h1, h2, h4 { font-weight: 600; color: #2c3e50; } p { word-spacing: 0.05em; } .text-center { text-align: center; } #header { padding: 10px 30px; position: relative; z-index: 2; background: #222; } #header ul li a { color: #fff; } #header ul li a:hover { color: #2c79c5; text-decoration: none; } #nav { list-style-type: none; margin: 0; padding: 0; position: absolute; right: 60px; top: 10px; height: 40px; line-height: 40px; } #nav > li { display: inline-block; position: relative; margin: 0 0.6em; } .search-query { height: 30px; line-height: 30px; box-sizing: border-box; padding: 0 15px 0 30px; border: 1px solid #e3e3e3; color: #2c3e50; outline: none; border-radius: 15px; margin-right: 10px; transition: border-color 0.2s ease; background: #fff url("//repo.bfw.wiki/bfwrepo/image/60adfd751ea68.png") 8px 5px no-repeat; background-size: 20px; vertical-align: middle !important; } #logo { display: inline-block; font-size: 1.4em; line-height: 40px; font-weight: 500; } #logo img { vertical-align: middle; margin-right: 6px; max-width: 200px; height: 40px; } .sidebar { position: absolute; z-index: 10; top: 60px; left: 0; bottom: 0; padding: 40px 0 30px 40px; width: 260px; margin-right: 20px; overflow-x: hidden; overflow-y: auto; -webkit-overflow-scrolling: touch; -ms-overflow-style: none; } .sidebar ul { list-style-type: none; margin: 0; line-height: 1.9em; padding-left: 1em; } .sidebar .main-menu { margin-bottom: 20px; display: none; padding-left: 0; } @media screen and (max-width: 900px) { .sidebar.open { -webkit-transform: translate(0, 0); transform: translate(0, 0); } .sidebar { z-index: 8; background-color: #f9f9f9; height: 100%; top: 0; left: 0; padding: 60px 30px 20px; box-shadow: 0 0 10px rgba(0, 0, 0, 0.2); box-sizing: border-box; transition: all 0.4s cubic-bezier(0.4, 0, 0, 1); -webkit-transform: translate(-280px, 0); transform: translate(-280px, 0); } .sidebar .search-query { width: 200px; margin-bottom: 10px; } .sidebar .main-menu { display: block; } } #header { box-shadow: 0 0 3px 1px rgba(0, 0, 0, 0.1); transition: background-color 0.3s ease-in-out; } @media screen and (max-width: 900px) { body { -webkit-text-size-adjust: none; font-size: 14px; } #header { position: fixed; top: 0; left: 0; width: 100%; height: 50px; background-color: #222; z-index: 9; box-shadow: 0 0 2px rgba(0, 0, 0, 0.25); padding: 0; } #header #nav { display: none; } #header .menu-button { position: absolute; width: 24px; height: 24px; top: 12px; right: 12px; background: url("//repo.bfw.wiki/bfwrepo/icon/5d835254a1dd1.png") center center no-repeat; background-size: 24px; } #header #logo { font-size: 1.5em; padding: 6px 0 6px 15px; color: #2c79c5; display: block; line-height: 100%; } #header #logo > a { display: inline-block; vertical-align: middle; } #header #logo > a:first-child { width: 40px; overflow: hidden; } #header #logo img { height: 40px; margin-top: 0px; max-width: 200px.........完整代码请登录后点击上方下载按钮下载查看
网友评论0