What I want to do is have something like this:
<button class="addMore">+</button>
Do an effect like this:
https://i.gyazo.com/d353b657df39c0e6ff159bfdb713f6a4.mp4
when you hover over it.
I've been able to find a few different things for this but none that act as I want it to in the video.
HTML: Use a container element (like <div>) and add the "tooltip" class to it. When the user mouse over this <div>, it will show the tooltip text. The tooltip text is placed inside an inline element (like <span>) with class="tooltiptext" .
To display the element on hover, make them invisible by default using display: none property. Then add :hover property on that element with display: block to make it visible on hover.
The :hover selector is used to select elements when you mouse over them. Tip: The :hover selector can be used on all elements, not only on links. Tip: Use the :link selector to style links to unvisited pages, the :visited selector to style links to visited pages, and the :active selector to style the active link.
Do you want to display text when hover an icon or button? In this quick tutorial, I will you how you can easily do this by just using HTML and CSS. I will create a set of icons list and when user mouse over an icon the text will be shown on the right side of the icon with CSS3 animation slideout effect. The animations are a very powerful tool.
There are two ways you can create a hover text (also known as a tooltip text) for your HTML elements: 1 Adding the global title attribute for your HTML tags 2 Creating a tooltip CSS effect using :before selector More ...
The hover text created from the title attribute is set by the browser, which means you can’t customize the style of the display. If you want a better looking hover text, then you need to create your own using CSS.
1 1. Insert a hyperlink. Select the object that you want to display the mouse over text for and launch the insert hyperlink dialog box, which you can do ... 2 2. Navigate to ‘Place in This Document’. 3 3. Open the ScreenTip Dialog Box. 4 4. Displaying Your Mouseover Text.
Use title
in order to display your message:
<button class="addMore" title="click here">+</button>
.addMore{ border: none; width: 32px; height: 32px; background-color: #eee; transition: all ease-in-out 0.2s; cursor: pointer; } .addMore:hover{ border: 1px solid #888; background-color: #ddd; }
<button class="addMore" title="Hover on me!">+</button>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With