Posted in site bugs
4887
12:51 am, January 17, 2021
 

spin rotate an element on mouse over [css]

i thought it might look good to spin this element around when the mouse is over it.

Added the following css to second_nav_toggle.

 

HTML

<a href="#!" id="second_nav_toggle" onclick="second_nav_toggle();" class="second_nav_toggle"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-chevron-down" viewBox="0 0 16 16">
  <path fill-rule="evenodd" d="M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z"></path>
</svg></a>

CSS

.second_nav_toggle:hover {
  transform: rotate(180deg);
  transition: all 0.3s;
}

.second_nav_toggle {
    transition: all 0.3s;
    padding: 3px 3px 0px 3px;
    border: 1px solid;
    border-radius: 3px;
    height: 23px;
    width: 24px;
    text-align: center;
    display: inline-block;
    margin-top: 3px;
    position: absolute;
    right: 5px;
}

View Statistics
This Week
67
This Month
337
This Year
657

No Items Found.

Add Comment
Type in a Nick Name here
 
Search Code
Search Code by entering your search text above.
Welcome

This is my test area for webdev. I keep a collection of code here, mostly for my reference. Also if i find a good link, i usually add it here and then forget about it. more...

Subscribe to weekly updates about things i have added to the site or thought interesting during the last week.

You could also follow me on twitter or not... does anyone even use twitter anymore?

If you found something useful or like my work, you can buy me a coffee here. Mmm Coffee. ☕

❤️👩‍💻🎮

🪦 2000 - 16 Oct 2022 - Boots
Random Quote
You want to be the best, you MUST put the long yards in! Nothing comes easy in life so stop wishing and start DOING! So many people would rather bitch and moan than help themselves. Dont be one of those negative drainers, start today, make a small change and keep going forwards with this attitude!
Unknown
Random CSS Property

overflow-block

The overflow-block CSS property sets what shows when content overflows the block start and block end edges of a box. This may be nothing, a scroll bar, or the overflow content.
overflow-block css reference