Css link style templates

Содержание
  1. CSS Links
  2. Styling Links
  3. Example
  4. Example
  5. Text Decoration
  6. Example
  7. Background Color
  8. Example
  9. Link Buttons
  10. Example
  11. More Examples
  12. Example
  13. Example
  14. Example
  15. COLOR PICKER
  16. Report Error
  17. Thank You For Helping Us!
  18. 56 CSS Link Hover Effects
  19. Related Articles
  20. Author
  21. Links
  22. Made with
  23. About a code
  24. Custom Animated Links with Psuedo Elements
  25. Author
  26. Links
  27. Made with
  28. About a code
  29. Hover Effect #4
  30. Author
  31. Links
  32. Made with
  33. About a code
  34. Hover Effect #5
  35. Author
  36. Links
  37. Made with
  38. About a code
  39. Hover Effect #6
  40. Author
  41. Links
  42. Made with
  43. About a code
  44. Hover Effect #7
  45. Author
  46. Links
  47. Made with
  48. About a code
  49. Hover Effect #1
  50. Author
  51. Links
  52. Made with
  53. About a code
  54. Hover Effect #2
  55. Author
  56. Links
  57. Made with
  58. About a code
  59. Mouse-Out Hover Effect
  60. Author
  61. Links
  62. Made with
  63. About a code
  64. Link Split Hover Effect
  65. Author
  66. Links
  67. Made with
  68. About a code
  69. Exploring Creative Link Hover Effects
  70. Author
  71. Links
  72. Made with
  73. About a code
  74. Fade out Other Links on Hover
  75. Author
  76. Links
  77. Made with
  78. About a code
  79. Laser Revealed Title Link
  80. Author
  81. Links
  82. Made with
  83. About a code
  84. Displaying Link URLs
  85. Author
  86. Links
  87. Made with
  88. About a code
  89. Neat Hover Effects
  90. Author
  91. Links
  92. Made with
  93. About a code
  94. Simple CSS Line Hover Animations for Links
  95. Author
  96. Links
  97. Made with
  98. About a code
  99. CSS Link Hover Animation
  100. Author
  101. Links
  102. Made with
  103. About a code
  104. Animated SVG Links
  105. Author
  106. Links
  107. Made with
  108. About a code
  109. Link Hover Animation
  110. Author
  111. Links
  112. Made with
  113. About a code
  114. Variable Powered Underline Transition
  115. Author
  116. Links
  117. Made with
  118. About a code
  119. Underline Animation — Link
  120. Author
  121. Links
  122. Made with
  123. About a code
  124. Link Hover Interaction
  125. Author
  126. Links
  127. Made with
  128. About a code
  129. Link Hover Flash
  130. Author
  131. Links
  132. Made with
  133. About a code
  134. Underline Animation
  135. Author
  136. Links
  137. Made with
  138. About a code
  139. Link Fill on Hover
  140. Author
  141. Links
  142. Made with
  143. About a code
  144. Underline Link Effect
  145. Author
  146. Links
  147. Made with
  148. About a code
  149. Half-transparent CurrentColor Link Underline
  150. Author
  151. Links
  152. Made with
  153. About a code
  154. Spring/Bounce Hover Effect
  155. Author
  156. Links
  157. Made with
  158. About the code
  159. Link Styling
  160. Author
  161. Links
  162. Made with
  163. About the code
  164. Flag # links!
  165. Author
  166. Links
  167. Made with
  168. About the code
  169. Link Effect
  170. Author
  171. Links
  172. Made with
  173. About the code
  174. Link with Gradient Background
  175. Author
  176. Links
  177. Made with
  178. About the code
  179. Animated Font Weight On Hover
  180. Author
  181. Links
  182. Made with
  183. About the code
  184. Multi-line Link
  185. Author
  186. Links
  187. Made with
  188. About the code
  189. Link Arrow
  190. Author
  191. Links
  192. Made with
  193. About the code
  194. Gradient Underline Animation
  195. Author
  196. Links
  197. Made with
  198. About the code
  199. Cool Hover Effect With mix-blend-mode
  200. Underline Hover
  201. Animate Underline Wavy
  202. Fancy Text-Shadow Link Underline
  203. Follow Along Links
  204. Pure CSS Single Element Link Styles
  205. Strikethrough Hover Effect
  206. Jumping Link Hovers
  207. Arrowed Link
  208. Author
Читайте также:  Опасно ли держать дома тигрового питона

With CSS, links can be styled in many different ways.

Links can be styled with any CSS property (e.g. color , font-family , background , etc.).

Example

In addition, links can be styled differently depending on what state they are in.

The four links states are:

  • a:link — a normal, unvisited link
  • a:visited — a link the user has visited
  • a:hover — a link when the user mouses over it
  • a:active — a link the moment it is clicked

Example

/* unvisited link */
a:link color: red;
>

/* visited link */
a:visited color: green;
>

/* mouse over link */
a:hover color: hotpink;
>

/* selected link */
a:active color: blue;
>

When setting the style for several link states, there are some order rules:

Text Decoration

The text-decoration property is mostly used to remove underlines from links:

Example

a:visited text-decoration: none;
>

a:hover text-decoration: underline;
>

a:active text-decoration: underline;
>

Background Color

The background-color property can be used to specify a background color for links:

Example

a:link <
background-color: yellow;
>

a:visited background-color: cyan;
>

a:hover background-color: lightgreen;
>

a:active background-color: hotpink;
>

This example demonstrates a more advanced example where we combine several CSS properties to display links as boxes/buttons:

Example

a:link, a:visited <
background-color: #f44336;
color: white;
padding: 14px 25px;
text-align: center;
text-decoration: none;
display: inline-block;
>

a:hover, a:active background-color: red;
>

More Examples

Example

This example demonstrates how to add other styles to hyperlinks:

Example

Another example of how to create link boxes/buttons:

a:link, a:visited <
background-color: white;
color: black;
border: 2px solid green;
padding: 10px 20px;
text-align: center;
text-decoration: none;
display: inline-block;
>

a:hover, a:active background-color: green;
color: white;
>

Example

This example demonstrates the different types of cursors (can be useful for links):

Unlock Full Access 50% off

COLOR PICKER

colorpicker

Join our Bootcamp!

Report Error

If you want to report an error, or if you want to make a suggestion, do not hesitate to send us an e-mail:

Thank You For Helping Us!

Your message has been sent to W3Schools.

Top Tutorials
Top References
Top Examples
Get Certified

W3Schools is optimized for learning and training. Examples might be simplified to improve reading and learning. Tutorials, references, and examples are constantly reviewed to avoid errors, but we cannot warrant full correctness of all content. While using W3Schools, you agree to have read and accepted our terms of use, cookie and privacy policy.

Источник

Collection of hand-picked free HTML and CSS link effect code examples from Codepen, GitHub, and other resources with :hover and :active state. Update of May 2021 collection. Twelve new items.

Author

Made with

About a code

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

Author

Made with

About a code

Hover Effect #4

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

Author

Made with

About a code

Hover Effect #5

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

Author

Made with

About a code

Hover Effect #6

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

Author

Made with

About a code

Hover Effect #7

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

Author

Made with

About a code

Hover Effect #1

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

Author

Made with

About a code

Hover Effect #2

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

Author

Made with

About a code

Mouse-Out Hover Effect

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

Author

Made with

About a code

The text is duplicated, masked with clip-path then psuedoelements and movements are animated with CSS transitions. The underscore is made with a linear gradient background image, but if you don’t plan to use a link like this over multiple lines of text, you could just use another pseudoelement.

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

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

Demo image: Laser Revealed Title Link

Author

Made with

About a code

How to display the href attribute of a link next to the link text.

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

Author

Made with

About a code

Neat Hover Effects

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

Author

Made with

About a code

A couple of simple & subtle CSS-based line hover animations for links.

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

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

Author

Made with

About a code

Variable Powered Underline Transition

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

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

Author

Made with

About a code

Underline Animation

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

Author

Made with

About a code

Link hover effects that fill a link with an underline or line-through using CSS transitions and the clip-path property.

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

Author

Made with

About a code

Animated underline/border link effect. Edit transform-origin to change how where the animation starts. It’s currently set to left.

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

Demo image: Half-transparent CurrentColor Link Underline

Author

Made with

About a code

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

Author

Made with

About a code

Spring/Bounce Hover Effect

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

Demo image: Link Styling

Author

Made with

About the code

Link styling exploration without classes.

Compatible browsers: Chrome, Firefox, Opera, Safari

Demo image: Flag # links!

Author

Made with

About the code

Broken link styles. Flag # links with CSS! Never forget a href=»#» placeholder again!

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

Author

Made with

About the code

HTML and CSS link squiggle effect.

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

Author

Made with

About the code

Link with gradient background on hover.

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

Author

Made with

About the code

Animated Font Weight On Hover

Author

Made with

About the code

Multi-line link hover effect.

Demo image: Link Arrow

Author

Made with

About the code

Author

Made with

About the code

Gradient Underline Animation

Using a css background gradient and css animation this allows the animation of a link underline to carry across multiple lines. This previously would be achieved using the :pseudo elements. However doing this over multiple lines proved tricky.

Author

Made with

About the code

Cool Hover Effect With mix-blend-mode

This is cool because you don’t need to change the color of the link on :hover . The mix-blend-mode in the ::after will invert it for you.

Underline Hover

HTML and CSS underline hover effect.
Made by Elwin van den Hazel
July 12, 2017

Demo Image: Animate underline Wavy

Animate Underline Wavy

That cool wiggly underline that people like.
Made by David Darnes
July 10, 2017

Demo Image: Fancy Text-Shadow Link Underline

HTML and CSS fancy text-shadow link underline.
Made by Ryan
July 1, 2017

Hover on the links and it follows the cursor, highlighting the links as you go!
Made by Katherine Kato
June 23, 2017

Inspired by things that have seen from Medium and other peoples pens but with an added attempt at bringing in some animation. Currently limited to a link that is in total 10000px wide across all lines.
Made by Matthew Shields
June 24, 2017

Demo Image: Strikethrough Hover Effect

Strikethrough Hover Effect

Hover effect for links. Use only one pseudo-element on link.
Made by Artyom
June 23, 2017

Jumping link hovers with HTML and CSS.
Made by Bennett Feely
June 19, 2017

Arrowed link — circle on hover (cf Google home website).
Made by Alexandre Jolly
May 21, 2017

Author

Источник

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