“flotter” Réponses codées

Sur Hover CSS

/* Changes an element's color on hover */

.selector {
	background-color: black;
}

.selector:hover {
	background-color: blue;
}
k-vernooy

CSS survole

.a:hover{background-color: black;}
Happy Hippopotamus

flotter

import { css, cx } from '@emotion/css'

const color = 'yellow'

render(
  <div
    className={css`
      padding: 32px;
      background-color: hotpink;
      font-size: 24px;
      border-radius: 4px;
      &:hover {
        color: ${color};
      }
    `}
  >
    Hover to change color.
  </div>
)
Said HR

flotter

import tkinter as tk

def on_enter(e):
    myButton['background'] = 'green'

def on_leave(e):
    myButton['background'] = 'SystemButtonFace'

root = tk.Tk()
myButton = tk.Button(root,text="Click Me")
myButton.grid()


myButton.bind("<Enter>", on_enter)
myButton.bind("<Leave>", on_leave)

root.mainloop()
Annoying Addax

Réponses similaires à “flotter”

Questions similaires à “flotter”

Parcourir les réponses de code populaires par langue

Parcourir d'autres langages de code