Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

bootstrap 4, cursor doesn't change when hovering over a button but does on anchors

I'm using bootstrap 4 alpha, and it seems that the cursor on buttons has been removed for buttons but not anchor tags. example on the bootstrap site.

https://v4-alpha.getbootstrap.com/components/buttons/

In my application i have a form, with two buttons, one is to post to the form and the other is to redirec to another page. The input doesn't display the cursor but the anchor does. I know i can create a custom css class, but is there a reason why this has been removed or is it an issue with the current alpha version?

<input type="submit" value="Sign In" class="btn btn-primary" />
<a role="button" href="@Url.Action("Register", "Account")" class="btn btn-secondary">Register Now</a>
like image 244
InitLipton Avatar asked Mar 30 '17 10:03

InitLipton


People also ask

How does your cursor change when you hover over a link?

By default, the mouse pointer is an arrow. When you hover over text you get the I-beam cursor, whereas the pointer changes to a hand cursor when the mouse is over a hyperlink.

Why cursor pointer is not working?

Check that the battery of the mouse is charged. Make sure that the receiver (dongle) is firmly plugged in to the computer. If your mouse and receiver can operate on different radio channels, make sure that they are both set to the same channel.

How do I change the hover arrow?

You can simply use the CSS cursor property with the value pointer to change the cursor into a hand pointer while hover over any element and not just hyperlink. In the following example when you place the cursor over the list item, it will change into a hand pointer instead of the default text selection cursor.

How do I make my cursor disabled in CSS?

Approach: First, select the element where cursor element need to hide. Add CSS style cursor:none to the a class. Add the class name (class name of CSS style cursor:none) to the particular element where cursor element to be hide.


1 Answers

Here's your explanation - https://medium.com/simple-human/buttons-shouldnt-have-a-hand-cursor-b11e99ca374b

I'm not sure Bootstrap v4 adds that on anchor elements either (can't check at the moment), but what I do know for sure is that browsers add the cursor by default whenever a link has the href attribute.

LE - The stable release was launched a week ago and it now features

.btn:not(:disabled):not(.disabled) {
    cursor: pointer;
}

Announcement at https://blog.getbootstrap.com/2018/01/18/bootstrap-4/

like image 166
Ravenous Avatar answered Oct 14 '22 23:10

Ravenous