如果你想给链接着色,你可以使用 .link-* helper classes ,它们有 :hover 和:focus 两种状态。 .text-primary .text-secondary .text-success .text-danger .text-warning .text-info .text-light .text-dark .text-body .text-muted .text-white .text-black-50 .text-white-50 复制这段代码 .text-prim...
text-primary text-secondary text-success text-danger text-warning text-info text-light text-dark text-body text-black-50 text-white-50 背景颜色 与text文字类颜色class定义相同,链接元互会在hover状态时变暗。背景色不要设置color样式, 尽可能使用.text-*通用CSS类。 背景颜色 bg-primary bg-secondary bg...
Similar to the contextual text color classes, easily set the background of an element to any contextual class. Anchor components will darken on hover, just like the text classes. Background utilitiesdo not setcolor, so in some cases you’ll want to use.text-*utilities. ...
3、在title标签后创建style标签用来给bg类添加样式。在这给bg类设置了一个宽、高和背景颜色。 如图 代码: .bg{ width: 150px;height: 150px;background-color: red;} 4、设置鼠标滑过div时背景变色。给bg样式类添加鼠标滑过:hover,然后设置鼠标滑过时的背景颜色。如图 代码:.bg:hover{ backgr...
.bg{ width: 150px;height: 150px;background-color: red;} 4、设置鼠标滑过div时背景变色。给bg样式类添加鼠标滑过:hover,然后设置鼠标滑过时的背景颜色。如图 代码:.bg:hover{ background-color: burlywood;} 5、实用浏览器打开。保存好html后使用浏览器打开,在鼠标没有滑过div时背景是红色...
Similar to the contextual text color classes, easily set the background of an element to any contextual class. Anchor components will darken on hover, just like the text classes. Background utilitiesdo not setcolor, so in some cases you’ll want to use.text-*utilities. ...
.bg{ width: 150px; height: 150px; background-color: red; } 4、设置鼠标滑过div时背景变色。给bg样式类添加鼠标滑过:hover,然后设置鼠标滑过时的背景颜并悉镇色。绝粗如图 代码: .bg:hover{ background-color: burlywood; }5、实用浏览器打开。保存好html后使用浏览器打开,在鼠标没有滑过div时背景是...
.hovereffect { width:100%; height:100%; float:left; overflow:hidden; position:relative; text-align:center; cursor:default; } .hovereffect .overlay { width:100%; height:100%; position:absolute; overflow:hidden; top:0; left:0; opacity:0; background-color:rgba(0,0,0,0.5); -webkit-tran...
Body text. Light grey text. Try it Yourself » Contextual text classes can also be used on links, which will add a darker hover color: You can also add 50% opacity for black or white text with the.text-black-50or.text-white-50classes: ...
Global text color on. @link-color Global textual link color. @link-hover-color Link hover color set viadarken()function. @link-hover-decoration Link hover decoration. Typography Font, line-height, and color for body text, headings, and more. @font-...