Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there any bootstrap 4 class with "cursor:pointer" different than "btn"?

I am using bootstrap cards class and I want to see the cursor pointer when hovering some card. However, I do not want to use style attribute, only bootstrap classes. I know that btn class is a possible choice, but it includes text-align: center and therefore I have to insert text-left to fix the alignment behavior.

Is there any bootstrap 4 option that offer just cursor :pointer property?

like image 230
Marcelo Machado Avatar asked Sep 20 '18 12:09

Marcelo Machado


People also ask

What are the different cursor types?

There are 2 types of Cursors: Implicit Cursors, and Explicit Cursors.

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 you add a different cursor in CSS?

Answer: Use the CSS cursor property You can define a custom cursor using the CSS cursor property. The cursor property takes the comma-separated list of user-defined cursors value followed by the generic cursor. First of all create cursor image and save it with the extension .


3 Answers

You could add role="button" to your HTML element, because Bootstrap has the following CSS:

[role=button] {
  cursor: pointer;
}

This also has the bonus of adding accessibility hints.

like image 140
Antoine Bolvy Avatar answered Sep 23 '22 13:09

Antoine Bolvy


You can make the card a summary element...

<summary class="card">
    <div class="card-body">
       ...
    </div>
</summary>

https://www.codeply.com/go/QRiBdrBHcL

like image 26
Zim Avatar answered Sep 22 '22 13:09

Zim


for now no cursor:pointer class is in bootstrap. you have add your own class in cursor pointer

like image 41
sibaspage Avatar answered Sep 22 '22 13:09

sibaspage