How to use a font-awesome icon for submenu
...and animate it
Montag, 6. Oktober 2014
Imagine you want to animate an arrow you used in a submenu. Just add a class .open when the submenu opens:
Html Fragment
<li aria-haspopup="true"> <a href="/url"> name </a><div class="submenu key_regional" aria-haspopup="false">submenuitems</div> </li>
(aria-haspopup=true makes it work smooth on windows 8 touch!)
Less Fragment:
> li { > a:after { font-family: FontAwesome; content: " \f078"; margin-right: 17px; float: right; font-size: 14px; -moz-transform: rotate(0deg); -ms-transform: rotate(0deg); -o-transform: rotate(0deg); -webkit-transform: rotate(0deg); transform: rotate(0deg); -moz-transition-property: all; -o-transition-property: all; -webkit-transition-property: all; transition-property: all; -moz-transition-duration: 0.5s; -o-transition-duration: 0.5s; -webkit-transition-duration: 0.5s; transition-duration: 0.5s; } } > li.open { > a:after { -moz-transform: rotate(180deg); -ms-transform: rotate(180deg); -o-transform: rotate(180deg); -webkit-transform: rotate(180deg); transform: rotate(180deg); -moz-transition-property: all; -o-transition-property: all; -webkit-transition-property: all; transition-property: all; -moz-transition-duration: 0.5s; -o-transition-duration: 0.5s; -webkit-transition-duration: 0.5s; transition-duration: 0.5s; } }
Blog / Lothar Steidle
Letzte Einträge
Montag, 9. Januar 2023
Cool uses for css Variables
Freitag, 21. August 2020
Dynamische Hintergrundbilder ohne Inline Styles verwenden
ohne csp unsafe-inline
Dienstag, 1. Oktober 2019
Content-Security-Policy
Sichere Websites
Montag, 2. April 2018
Piwik/Matomo Opt Out Iframe funktioniert nicht
In einer Multidomain Installation
Freitag, 23. März 2018
Website mit Bootstrap druckt keine Hintergrundfarben
Alle anzeigen (10)
Beliebteste Einträge
Donnerstag, 4. Februar 2016
Intellisense not working for Razor Views
Montag, 7. Juli 2014
Send a Posted Form through Modelbinder as Email
In C# MVC
Mittwoch, 30. März 2016
Essential Visual Studio 2015 Extensions
for Webdevelopers
Montag, 6. Oktober 2014
How to use a font-awesome icon for submenu
...and animate it
Montag, 2. April 2018
Piwik/Matomo Opt Out Iframe funktioniert nicht
In einer Multidomain Installation
Alle anzeigen (10)