css布局实现多种下拉菜单导航显示效果代码
代码语言:html
所属分类:菜单导航
代码描述:css布局实现多种下拉菜单导航显示效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en" > <head> <meta charset="UTF-8"> <style> /* ========================================================================== NMC Bootstrap This LESS file imports all other LESS files. You should compile and minify this file before site launch. ========================================================================== */ /* Import NMC bootstrap */ /** * html5doctor.com Reset Stylesheet * v1.6.1 * Last Updated: 2010-09-17 * Author: Richard Clark - http://richclarkdesign.com * Twitter: @rich_clark */ html, body, div, span, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, abbr, address, cite, code, del, dfn, em, img, ins, kbd, q, samp, small, strong, sub, sup, var, b, i, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, canvas, details, figcaption, figure, footer, header, hgroup, menu, nav, section, summary, time, mark, audio, video { margin: 0; padding: 0; border: 0; outline: 0; font-size: 100%; vertical-align: baseline; background: transparent; } body { line-height: 1; } article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section { display: block; } nav ul { list-style: none; } blockquote, q { quotes: none; } blockquote:before, blockquote:after, q:before, q:after { content: ''; content: none; } a { margin: 0; padding: 0; font-size: 100%; vertical-align: baseline; background: transparent; } /* change colours to suit your needs */ ins { background-color: #ff9; color: #000; text-decoration: none; } /* change colours to suit your needs */ mark { background-color: #ff9; color: #000; font-style: italic; font-weight: bold; } del { text-decoration: line-through; } abbr[title], dfn[title] { border-bottom: 1px dotted; cursor: help; } table { border-collapse: collapse; border-spacing: 0; } /* change border colour to suit your needs */ hr { display: block; height: 1px; border: 0; border-top: 1px solid #cccccc; margin: 1em 0; padding: 0; } input, select { vertical-align: middle; } /*--------------------------------------------------- LESS Prefixer --------------------------------------------------- All of the CSS3 fun, none of the prefixes! As a rule, you can use the CSS properties you would expect just by adding a '.': box-shadow => .box-shadow(@args) Also, when shorthand is available, arguments are not parameterized. Learn CSS, not LESS Prefixer. ------------------------------------------------- TABLE OF CONTENTS (*) denotes a syntax-sugar helper ------------------------------------------------- .animation(@args) .animation-delay(@delay) .animation-direction(@direction) .animation-duration(@duration) .animation-iteration-count(@count) .animation-name(@name) .animation-play-state(@state) .animation-timing-function(@function) .background-size(@args) .border-radius(@args) .box-shadow(@args) .inner-shadow(@args) * .box-sizing(@args) .border-box() * .content-box() * .columns(@args) .column-count(@count) .column-gap(@gap) .column-rule(@args) .column-width(@width) .gradient(@default,@start,@stop) * .linear-gradient-top(@default,@color1,@stop1,@color2,@stop2,[@color3,@stop3,@color4,@stop4])* .linear-gradient-left(@default,@color1,@stop1,@color2,@stop2,[@color3,@stop3,@color4,@stop4])* .opacity(@factor) .transform(@args) .rotate(@deg) .scale(@factor) .translate(@x,@y) .translate3d(@x,@y,@z) .translateHardware(@x,@y) * .text-shadow(@args) .transition(@args) .transition-delay(@delay) .transition-duration(@duration) .transition-property(@property) .transition-timing-function(@function) Credit to LESS Elements for the motivation and to CSS3Please.com for implementation. Copyright (c) 2012 Joel Sutherland MIT Licensed: https://www.opensource.org/licenses/mit-license.php -----------------------------------------------------*/ /* Animation */ /* Background Size */ /* Border Radius */ /* Box Shadows */ /* Box Sizing */ /* Columns */ /* Gradients */ /* Opacity */ /* Text Shadow */ /* Transforms */ /* Transitions */ /** * New Media Campaigns Idioms * * These are common patterns we use in all of our * projects. They are consolidated here to keep code DRY. * * Listing * * .noText,.textReplace * * .noList * * .noForm * * .fixedWidth(@width) * * .columnWidth(@width) * * .columnLeft(@width) * * .columnRight(@width) * * .fullSize * * .absoluteDefault * * .absoluteFullSize * * .clearFix */ /* Hides text when using image replacement */ .noText, .textReplace { overflow: hidden; text-indent: 100%; white-space: nowrap; } /* Removes bullets, margin, and padding from list */ .noList { list-style: none; margin: 0; padding: 0; } /* Removes webkit styling from form element */ .noForm { border: none; margin: 0; padding: 0; -webkit-appearance: none; } /* Center a fixed width container */ /* Adds left or right columns (e.g. content and sidebar) */ /* Set width and height of element to that of its parent */ .fullSize { height: 100%; width: 100%; } /* Position element absolutely to 0,0 */ .absoluteDefault { position: absolute; left: 0; top: 0; } /* Position element absolutely and set its width and height to that of its parent (useful for slideshows) */ .absoluteFullSize { position: absolute; left: 0; top: 0; height: 100%; width: 100%; } /* The micro clearfix http://nicolasgallagher.com/micro-clearfix-hack/ */ .clearFix { *zoom: 1; } .clearFix:before, .clearFix:after { content: ""; display: table; } .clearFix:after { clear: both; } /** * Spacing * * This LESS file defines margins and paddings for block-level * elements. Helper classes are included for use elsewhere * in site styles. */ /* Settings */ /** * Spacing * p, m, lh = padding, margin, line-height * a, t, r, b, l, h, v = all, top, right, bottom, left, horizontal, vertical * n, h, s, d = none(0px), half(@baseline / 2), single(@baseline), double(@baseline * 2), none(0px) * i = ! important */ .ptn { padding-top: 0px; } .ptni { padding-top: 0px !important; } .pbn { padding-bottom: 0px; } .pbni { padding-bottom: 0px !important; } .pln { padding-left: 0px; } .plni { padding-left: 0px !important; } .prn { padding-right: 0px; } .prni { padding-right: 0px !important; } .pvn { padding-top: 0px; padding-.........完整代码请登录后点击上方下载按钮下载查看
网友评论0