Стили меню html css

Содержание
  1. CSS Horizontal Navigation Bar
  2. Inline List Items
  3. Example
  4. Floating List Items
  5. Example
  6. Example
  7. Horizontal Navigation Bar Examples
  8. Example
  9. Active/Current Navigation Link
  10. Example
  11. Right-Align Links
  12. Example
  13. Border Dividers
  14. Example
  15. Fixed Navigation Bar
  16. Fixed Top
  17. Fixed Bottom
  18. Gray Horizontal Navbar
  19. Example
  20. Sticky Navbar
  21. Example
  22. More Examples
  23. Responsive Topnav
  24. Responsive Sidenav
  25. Dropdown Navbar
  26. 102 CSS Menu
  27. Table of Contents
  28. Related Articles
  29. Author
  30. Links
  31. Made with
  32. About a code
  33. Menu
  34. Author
  35. Links
  36. Made with
  37. About a code
  38. Fullscreen Overlay Navigation Bar
  39. Author
  40. Links
  41. Made with
  42. About a code
  43. Three Fancy Link Hover Effects
  44. Author
  45. Links
  46. Made with
  47. About a code
  48. Navigation Dotted Hover Effect
  49. Author
  50. Links
  51. Made with
  52. About a code
  53. Fullscreen Overlay Navigation Bar
  54. Author
  55. Links
  56. Made with
  57. About a code
  58. Context Menu
  59. Author
  60. Links
  61. Made with
  62. About a code
  63. Pure CSS Menu
  64. Author
  65. Links
  66. Made with
  67. About a code
  68. Neumorphism Context Menu
  69. Author
  70. Links
  71. Made with
  72. About a code
  73. Simple Navigation System
  74. Author
  75. Links
  76. Made with
  77. About a code
  78. CSS Menu
  79. Author
  80. Links
  81. Made with
  82. About a code
  83. Fullscreen Menu Enter
  84. Author
  85. Links
  86. Made with
  87. About a code
  88. Context Menu with Feather Icons
  89. Author
  90. Links
  91. Made with
  92. About a code
  93. CSS Hamburger Menu
  94. Author
  95. Links
  96. Made with
  97. About a code
  98. Text Fill on Hover
  99. Author
  100. Links
  101. Made with
  102. About a code
  103. List Item Hower Effect
  104. Author
  105. Links
  106. Made with
  107. About a code
  108. CSS-Only Marquee Effect
  109. Author
  110. Links
  111. Made with
  112. About a code
  113. CSS Full-Page Navigation
  114. Author
  115. Links
  116. Made with
  117. About a code
  118. Randomly Generated CSS Blobby Nav
  119. Author
  120. Links
  121. Made with
  122. About a code
  123. Full-Page Navigation
  124. Author
  125. Links
  126. Made with
  127. About a code
  128. Pure CSS Full Page Nav
  129. Author
  130. Links
  131. Made with
  132. About a code
  133. Fold Out Mobile Menu
  134. Author
  135. Links
  136. Made with
  137. About a code
  138. Menu Hover Fill Text
  139. Author
  140. Links
  141. Made with
  142. About a code
  143. Menu with Awesome Hover
  144. Author
  145. Links
  146. Made with
  147. About a code
  148. CSS Navigation Bar
  149. Author
  150. Links
  151. Made with
  152. About a code
  153. Menu Hover Underline
  154. Author
  155. Links
  156. Made with
  157. About a code
  158. Apple TV Menu Interface
  159. Author
  160. Links
  161. Made with
  162. About a code
  163. CSS Strange Nav
  164. Author
  165. Links
  166. Made with
  167. About a code
  168. Navbar with Pure CSS
  169. Author
  170. Links
  171. Made with
  172. About a code
  173. Navbar Interaction
  174. Author
  175. Links
  176. Made with
  177. About a code
  178. Off Canvas Menu Pure CSS
  179. Author
  180. Links
  181. Made with
  182. About a code
  183. Menu Bar CSS
  184. Author
  185. Links
  186. Made with
  187. About a code
  188. Vertical Dark Menu with CSS
  189. Author
  190. Links
  191. Made with
  192. About the code
  193. Moving Underline Nav Menu
  194. Author
  195. Links
  196. Author
  197. Links
  198. Made with
  199. About the code
  200. Navigation Menu
  201. Author
  202. Links
  203. Made with
  204. About the code
  205. 3D Navbar
  206. Author
  207. Links
  208. Made with
  209. About the code
  210. Just Another Menu
  211. Author
  212. Links
  213. Made with
  214. About the code
  215. Pure CSS Menu
  216. Author
  217. Links
  218. Made with
  219. About the code
  220. CSS Menu Feat. Emoji
  221. Author
  222. Links
  223. Made with
  224. About the code
  225. The Menu
  226. Author
  227. Links
  228. Made with
  229. About the code
  230. Menu Effect
  231. Author
  232. Links
  233. Made with
  234. About the code
  235. CSS-Only Nested Dropdown Navigation
  236. Full Page Off-Canvas Navigation
  237. Simple Radial Menu
  238. Accordion Menu
  239. Mobile Filter Menu
  240. Author
Читайте также:  Python row add column

CSS Horizontal Navigation Bar

There are two ways to create a horizontal navigation bar. Using inline or floating list items.

Inline List Items

Example

  • display: inline; — By default,
  • elements are block elements. Here, we remove the line breaks before and after each list item, to display them on one line

Floating List Items

Example

a display: block;
padding: 8px;
background-color: #dddddd;
>

  • float: left; — Use float to get block elements to float next to each other
  • display: block; — Allows us to specify padding (and height, width, margins, etc. if you want)
  • padding: 8px; — Specify some padding between each element, to make them look good
  • background-color: #dddddd; — Add a gray background-color to each element

Example

Horizontal Navigation Bar Examples

Create a basic horizontal navigation bar with a dark background color and change the background color of the links when the user moves the mouse over them:

Example

ul <
list-style-type: none;
margin: 0;
padding: 0;
overflow: hidden;
background-color: #333;
>

li a display: block;
color: white;
text-align: center;
padding: 14px 16px;
text-decoration: none;
>

/* Change the link color to #111 (black) on hover */
li a:hover background-color: #111;
>

Add an «active» class to the current link to let the user know which page he/she is on:

Example

Right-align links by floating the list items to the right ( float:right; ):

Example

Border Dividers

Example

/* Add a gray right border to all list items, except the last item (last-child) */
li border-right: 1px solid #bbb;
>

li:last-child border-right: none;
>

Fixed Navigation Bar

Make the navigation bar stay at the top or the bottom of the page, even when the user scrolls the page:

Fixed Top

Fixed Bottom

Note: Fixed position might not work properly on mobile devices.

Gray Horizontal Navbar

An example of a gray horizontal navigation bar with a thin gray border:

Example

ul <
border: 1px solid #e7e7e7;
background-color: #f3f3f3;
>

    to create a sticky navbar.

A sticky element toggles between relative and fixed, depending on the scroll position. It is positioned relative until a given offset position is met in the viewport — then it «sticks» in place (like position:fixed).

Example

Note: Internet Explorer do not support sticky positioning. Safari requires a -webkit- prefix (see example above). You must also specify at least one of top , right , bottom or left for sticky positioning to work.

More Examples

Responsive Topnav

How to use CSS media queries to create a responsive top navigation.

Responsive Sidenav

How to use CSS media queries to create a responsive side navigation.

How to add a dropdown menu inside a navigation bar.

Ever heard about W3Schools Spaces? Here you can create your website from scratch or use a template, and host it for free.

Источник

102 CSS Menu

Collection of free HTML and CSS navigation menu code examples. Update of May 2020 collection. 27 new items.

Table of Contents

Author

Made with

About a code

Compatible browsers: Chrome, Edge, Firefox, Opera, Safari

Author

Made with

About a code

Fullscreen Overlay Navigation Bar

Compatible browsers: Chrome, Edge, Firefox, Opera, Safari

Author

Made with

About a code

Transitioning clip-path and pseudo-element transform s to create smooth link hovers.

Compatible browsers: Chrome, Edge, Firefox, Opera, Safari

Author

Made with

About a code

Compatible browsers: Chrome, Edge, Firefox, Opera, Safari

Author

Made with

About a code

Fullscreen Overlay Navigation Bar

Fullscreen overlay navigation bar with html & css neon effect.

Compatible browsers: Chrome, Edge, Firefox, Opera, Safari

Author

Made with

About a code

Context Menu

Compatible browsers: Chrome, Edge, Firefox, Opera, Safari

Author

Made with

About a code

Pure CSS Menu

Compatible browsers: Chrome, Edge, Firefox, Opera, Safari

Author

Made with

About a code

Neumorphism Context Menu

Compatible browsers: Chrome, Edge, Firefox, Opera, Safari

Author

Made with

About a code

Simple Navigation System

Simple system for navigating a hierarchy in a confined space. Uses standard HTML and CSS, no JavaScript.

Compatible browsers: Chrome, Edge, Firefox, Opera, Safari

Author

Made with

About a code

CSS Menu

Compatible browsers: Chrome, Edge, Firefox, Opera, Safari

Author

Made with

About a code

Fullscreen Menu Enter

Compatible browsers: Chrome, Edge, Firefox, Opera, Safari

Author

Made with

About a code

Context Menu with Feather Icons

Compatible browsers: Chrome, Edge, Firefox, Opera, Safari

Author

Made with

About a code

CSS Hamburger Menu

Pure CSS menu interaction. Made using the HTML tags details and summary .

Compatible browsers: Chrome, Edge, Firefox, Opera, Safari

Author

Made with

About a code

Text Fill on Hover

Filling the text with a different color on hover — a creative text effect.

Compatible browsers: Chrome, Edge, Firefox, Opera, Safari

Author

Made with

About a code

List Item Hower Effect

Compatible browsers: Chrome, Edge, Firefox, Opera, Safari

Author

Made with

About a code

CSS-Only Marquee Effect

A simple CSS-only marquee effect for a menu.

Compatible browsers: Chrome, Edge, Firefox, Opera, Safari

Author

Made with

About a code

CSS Full-Page Navigation

Compatible browsers: Chrome, Edge, Firefox, Opera, Safari

Author

Made with

About a code

Randomly Generated CSS Blobby Nav

A randomly generated blobby nav created with CSS. Has smooth anchor scrolling, uses backdrop-filter , and SVG filter.

Compatible browsers: Chrome, Edge, Firefox, Opera, Safari

Author

Made with

About a code

Full-Page Navigation

Compatible browsers: Chrome, Edge, Firefox, Opera, Safari

Author

Made with

About a code

Pure CSS Full Page Nav

Compatible browsers: Chrome, Edge, Firefox (partial), Opera, Safari

Author

Made with

About a code

Fold Out Mobile Menu

CSS only fold out mobile menu.

Compatible browsers: Chrome, Edge, Firefox, Opera, Safari

Author

Made with

About a code

Menu hover fill text ( color + background-clip ).

Compatible browsers: Chrome, Edge, Firefox, Opera, Safari

Author

Made with

About a code

Compatible browsers: Chrome, Edge, Firefox, Opera, Safari

Dependencies: bootstrap.css, bootstrap-social.css, font-awesome.css

Author

Made with

About a code

CSS Navigation Bar

Implemented a minimal navigation bar that changes color on hovering. Written using only HTML and SCSS.

Compatible browsers: Chrome, Edge, Firefox, Opera, Safari

Author

Made with

About a code

Compatible browsers: Chrome, Edge, Firefox, Opera, Safari

Author

Made with

About a code

Apple TV Menu Interface

Compatible browsers: Chrome, Edge, Opera, Safari

Author

Made with

About a code

CSS Strange Nav

Made a strange navigation. CSS only. Let’s Click!

Compatible browsers: Chrome, Edge, Firefox, Opera, Safari

Author

Made with

About a code

Compatible browsers: Chrome, Edge, Firefox, Opera, Safari

Author

Made with

About a code

Compatible browsers: Chrome, Edge, Firefox, Opera, Safari

Author

Made with

About a code

Off Canvas Menu Pure CSS

Off canvas menu pure CSS by using only CSS.

Compatible browsers: Chrome, Edge, Firefox, Opera, Safari

Author

Made with

About a code

Compatible browsers: Chrome, Edge, Firefox, Opera, Safari

Author

Made with

About a code

Vertical Dark Menu with CSS

Simple vertical dark menu with CSS and icons.

Compatible browsers: Chrome, Edge, Firefox, Opera, Safari

Author

Made with

About the code

Moving Underline Nav Menu

Compatible browsers: Chrome, Firefox, Opera, Safari

Author

Author

Made with

About the code

Usable as navigation, menu or effect. It uses CSS transform and perspective to create a unique hololens-like animation effect.

Compatible browsers: Chrome, Edge, Firefox, Opera, Safari

Author

Made with

About the code

3D Navbar

3D navbar in HTML and CSS.

Compatible browsers: Chrome, Edge, Firefox, Opera, Safari

Author

Made with

About the code

Just Another Menu

Pure CSS floating menu animation.

Compatible browsers: Chrome, Edge, Firefox, Opera, Safari

Author

Made with

About the code

Pure CSS Menu

Pure CSS menu drawer with off-click.

Compatible browsers: Chrome, Edge, Firefox, Opera, Safari

Author

Made with

About the code

CSS Menu Feat. Emoji

Compatible browsers: Chrome, Edge, Firefox, Opera, Safari

Author

Made with

About the code

The Menu

Table contents style menu.

Compatible browsers: Chrome, Edge, Firefox, Opera, Safari

Author

Made with

About the code

Reverse text color menu effects.

Compatible browsers: Chrome, Firefox, Opera, Safari

Demo image: CSS-Only Nested Dropdown Navigation (ARIA)

Author

Made with

About the code

CSS-Only Nested Dropdown Navigation

CSS only nested dropdown navigation with ARIA.

Demo Image: Full Page Off-Canvas Navigation

Full Page Off-Canvas Navigation

An example of how to build a full page navigation that exists off of the screen canvas, sliding into view when clicking the menu option. Added spice with a changing background color depending on navigation item hover.
Made by Caleb Varoga
June 17, 2016

Demo Image: Simple Radial Menu

Simple Radial Menu

HTML, CSS, JavaScript simple radial menu with social icons.
Made by Nikolay Talanov
June 13, 2016

Demo Image: Simple accordion menu with HTML, CSS and JavaScript

Accordion Menu

Simple accordion menu with HTML, CSS and JavaScript.
Made by JuliaRietveld
June 8, 2016

Demo Image: Mobile Filter Menu

Mobile Filter Menu

Filter menu created by Anton Aheichanka that has been converted into web version.
Made by Arjun Amgain
June 1, 2016

Author

Источник

Оцените статью