jQuery UI API - efek yang menonjol (Efek Highlight)
kategori
pemakaian
Keterangan: Sorot efek (Sorot Effect) dengan terlebih dahulu mengubah warna latar belakang untuk menyembunyikan atau menampilkan elemen.
highlight
参数 | 类型 | 描述 | 默认值 |
---|---|---|---|
color | String | 动画期间使用的背景颜色。 | "#ffff99" |
contoh
Gunakan untuk menyorot efek khusus (Efek Highlight) beralih div.
<! DOCTYPE html> <Html lang = "en"> <Head> <Meta charset = "utf-8"> <Title> efek khusus yang luar biasa (Sorot Effect) Demo </ title> <Link rel = "stylesheet" href = "// code.jquery.com/ui/1.10.4/themes/smoothness/jquery-ui.css"> <Gaya> #toggle { width: 100px; height: 100px; background: # ccc; } </ Style> <Script src = "// code.jquery.com/jquery-1.10.2.js"> </ script> <Script src = "// code.jquery.com/ui/1.10.4/jquery-ui.js"> </ script> </ Kepala> <Body> <P> Klik di mana saja untuk beralih. </ P> <Div id = "beralih"> </ div> <Script> $ (Dokumen) .Klik (function () { $ ( "#toggle") .toggle ( "Highlight"); }); </ Script> </ Body> </ Html>