Bootstrap3 - Using glyphicon as background image in CSS
来源:互联网 发布:男生发型软件 编辑:程序博客网 时间:2024/06/03 20:21
示例一:
.expandable { height:40px; width:50%; margin:6px;}.expandable:before{ content:"\2b"; font-family:"Glyphicons Halflings"; line-height:1; margin:5px;}.expanded { height:40px; width:50%; margin:6px;}.expanded:before{ content:"\2212"; font-family:"Glyphicons Halflings"; line-height:1; margin:5px;}
And for reference, my HTML is:
<div class="panel-group" id="accordion"> <div class="panel panel-default"> <div class="panel-heading"> <p1 class="panel-title" > <a data-toggle="collapse" data-parent="#accordion" href="#collapseOne" class="expandable"> Provider details </a> <p2> </div> <div id="collapseOne" class="panel-collapse collapse"> <div class="panel-body"> blah, blah....
And JS to detect the opening/closing of the sections:
$ -> $(".expandable").click () -> $this = $(this) if $this.hasClass("expandable") $this.removeClass("expandable").addClass "expanded" else $this.removeClass("expanded").addClass "expandable" if $this.hasClass("expanded") return return
示例二:
<div id="lol"></div>
#lol{ height:40px; border:1px solid #555; width:50%; margin:30px;}#lol:before{ content:"\2b"; font-family:"Glyphicons Halflings"; line-height:1; margin:10px; display:inline-block;}
0 0
- Bootstrap3 - Using glyphicon as background image in CSS
- css---Using Background-Image to Replace Text
- Save+as+Image+using+DrawingImage()+in+WPF
- CSS细节--background-image
- CSS background-image属性
- CSS background/background-image显示问题小议
- bootstrap3的jumbotron和glyphicon glyphicon-*的用法
- bootstrap3的jumbotron和glyphicon glyphicon-*的用法
- Set image as background for a view
- div+css - CSS标准 - background-image背景图片
- background-image(CSS) url 路径问题
- css background-image 自适应宽高
- CSS中background-image:url()属性设置
- CSS 使用 background-image url base64
- webpack background-image css 显示不了
- css background-image 自适应宽高
- Using CSS for Image Borders
- Background Service in Android Using IntentService
- C语言纪要
- 【黑马程序员】第五章:多线程
- Spring、Spring MVC、Struts2、优缺点整理
- HP ProLiant BL460c Gen8 服务器部署手记
- 看图学网络 三 网络核心部分的数据交换(电路 报文 分组 交换)
- Bootstrap3 - Using glyphicon as background image in CSS
- 黑马程序员——方法.构造方法,抽象方法
- 1030. Travel Plan (30)【最短路+路径记忆】——PAT (Advanced Level) Practise
- 【Codeforces Round 334 (Div 2)D】【数论 置换群 典型数据特判 附带打表代码】Moodular Arithmetic 满足f(k x)=k f(x)的映射个数
- 【IOS网络】ATS的小总结
- zookeeper服务优化
- java 正则表达式浅析
- 学习笔记之正则表达式
- js定时器