自适应大气公司官网效果
代码语言:html
所属分类:布局界面
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title> Website Header with Bootstrap Carousel</title> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel='stylesheet' href='http://repo.bfw.wiki/bfwrepo/css/bootstrap.css'> <script src='http://repo.bfw.wiki/bfwrepo/js/jquery.2.11.js'></script> <style> .container-fluid.main{ position: relative; /* To make the navbar positions relative to this container */ padding: 0; } .navbar-default { background-image: none; background-color: transparent; /* Make the menu become transparent */ border-radius: 0px; border: 0; box-shadow: none; padding: 10px; position: absolute; /* Make the menu out of the document flow so it can placed anywhere without disturbing other widgets */ top: 0; left: 0; right: 0; z-index: 10; /* If you delete this line, your menu link won't be clicked because it is behind the background. Applying this code bring the menu in front of the background */ } .navbar-default .navbar-brand { font-family: Verdana; color: #ffffff; font-size: 20px; } .navbar-default .navbar-brand:hover, .navbar-default .navbar-brand:focus { color: #ffffff; background-color: transparent; } .navbar-default .navbar-nav > li > a { color: #ffffff; } .navbar-default .navbar-nav > li > a:hover, .navbar-default .navbar-nav > li > a:focus { color: #ffffff; background-color: transparent; } .navbar-default .navbar-toggle { border-color: transparent; } .navbar-default .navbar-toggle:hover { background-color: transparent; } .navbar-default .navbar-toggle:focus { background-color: transparent; } .navbar-default .navbar-toggle .icon-bar { background-color: #ffffff; } .carousel .background { background-position: center center; background-size: 100% 100%; background-repeat: no-repeat; height: 700px; } @media (max-width:991px) { .carousel .background { background-size: cover; /* To make the background image looks good */ } } .carousel .background.a { background-image: linear-gradient( rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url("https://static.pexels.com/photos/92090/pexels-photo-92090-large.jpeg"); } .carousel .background.b { background-image: linear-gradient( rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url("https://static.pexels.com/photos/93750/pexels-photo-93750-large.jpeg"); } .carousel .background.c { background-image: linear-gradient( rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url("https://static.pexels.com/photos/76827/bahia-ocean-bay-boat-76827-large.jpeg"); } .carousel-fade .carousel-inner .item { opacity: 0; transition: opacity 0.5s; /* The 0.5s describes the duration to make the opacity from 0 to 1 */ } .carousel-fade .carousel-inner .active { opacity: 1; } /* CSS Hack to trigger GPU for smooth transition */ @media all and (transform-3d), (-webkit-transform-3d) { .carousel-fade .carousel-inner > .item.next, .carousel-fade .carousel-inner > .item.active.right { opacity: 0; -webkit-transform: translate3d(0, 0, 0); transform: translate3d(0, 0, 0); } .carousel-fade .carousel-inner > .item.prev, .carousel-fade .carousel-inner > .item.active.left { opacity: 0; -webkit-transform: translate3d(0, 0, 0); transform: translate3d(0, 0, 0); } .carousel-fade .carousel-inner > .item.n.........完整代码请登录后点击上方下载按钮下载查看
网友评论0