跟随我在oracle学习php(13)
常用的css样式
[class~="col-6"]:选择我所有类名中包含有col-6独立单词的元素
[class*="col-"]:选择所有类名中含有"col-"的元素
[class^="col-"]:选择所有类名中以"col-"开头的元素
[class$="-col"]:选择所有类名中以"-col"结尾的元素
:after和:before的作用及使用方法
1.:before 和 :after 的主要作用是在元素内容前后加上指定内容
html:
<p>你好</p>
css:
p:before{
content: 'Hello';
color: red;
}
p:after{
content: 'Tom';
color: red;
}
2.:after清除浮动
.clearfix:after{
content:"";
display:block;
clear:both;
}
3.:before和:after 用来写小三角形
大多数时候小三角是直接用图标的,也可以用div然后绝对定位到指定位置
html:
<div class="menu">菜单</div>
1
css:
.menu:after{
content: '';
display: inline-block;
width: 0;
height: 0;
border: 8px solid transparent; //有时候会变形,需要分别对4边进行赋值
border-left: 8px solid #AFABAB;
position: relative;
top: 2px;
left: 10px;
}
4.用:after和:before 写一个对话框
HTML代码:
<div class="left">
<p>吃了吗</p>
</div>
<div class="right">
<p>吃过了,吃了红烧排骨和酸菜鱼</p>
</div>
CSS代码:
.left,.right{
min-height: 40px;
position: relative;
display: table;
text-align: center;
border-radius: 7px;
background-color: #9EEA6A;
}
.right{ /*使左右的对话框分开*/
top: 40px;
left: 60px;
}
.left > p,.right > p{ /*使内容居中*/
display: table-cell;
vertical-align: middle;
padding: 0 10px;
}
.left:before,.right:after{ /*用伪类写出小三角形*/
content: '';
display: block;
width: 0;
height: 0;
border: 8px solid transparent;
position: absolute;
top: 11px;
}
/*分别给左右两边的小三角形定位*/
.left:before{
border-right: 8px solid #9EEA6A;
left: -16px;
}
.right:after{
border-left: 8px solid #9EEA6A;
right: -16px;
}
上面的对话框是模仿微信的样式写的,用:before和:after写很方便哦
下面写一个带边框的对话框,一个对话会同时用到:before和:after
HTML代码不变
CSS代码:
.left,.right{
min-height: 40px;
position: relative;
display: table;
text-align: center;
border-radius: 7px;
background-color: #9EEA6A;
border: 1px solid #736262;
}
.right{ /*使左右的对话框分开*/
top: 40px;
left: 60px;
}
.left > p,.right > p{ /*使内容居中*/
display: table-cell;
vertical-align: middle;
padding: 0 10px;
}
.left:before,.right:after,.left:after,.right:before{ /*用伪类写出小三角形*/
content: '';
display: block;
width: 0;
height: 0;
border: 8px solid transparent;
position: absolute;
top: 11px;
}
/*分别给左右两边的小三角形定位*/
.left:before{
border-right: 8px solid #9EEA6A;
left: -16px;
}
.left:after{ /*左边对话框小三角形的边框样式*/
border-right: 8px solid #736262;
left: -17px;
z-index: -1;
}
.right:after{
border-left: 8px solid #9EEA6A;
right: -16px;
}
.right:before{ /*右边对话框小三角形的边框样式*/
border-left: 8px solid #736262;
right: -17px;
z-index: -1;
}
(在写有边框的对话框时一个三角形需要同时用到:before和:after) 定位相差1px
单行…
.text-flow {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
多行…
.text-flow {
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
overflow: hidden;
word-break: break-all;
word-wrap: break-word;
} //谷歌才会出现的效果,为确保其他浏览器不出现样式问题,height:xxxpx
跟随我在oracle学习php(13)的更多相关文章
- Oracle 学习笔记 13 -- 控制用户权限
数据库控制语言的功能室控制用户对数据库的存取权限. 用户对某类数据具有何种操作权限是有DBA决定的.Oracle 通过GRANT语句完毕权限的授予,通过REVOKE语句完毕对权限的收回. 权限分为系统 ...
- 跟随我在oracle学习php(19)
Order by子句 形式: order by 排序字段1 [排序方式], 排序字段2 [排序方式], ..... 说明: 对前面取得的数据(含from子句,where子句,group子句, ...
- 跟随我在oracle学习php(18)
修改表: 一般概述 通常,创建一个表,能搞定(做到)的事情,修改表也能做到.大体来说,就可以做到: 增删改字段: 增:alter table 表名 add [column] 字段名 字段类 ...
- 跟随我在oracle学习php(17)
通用设定形式 定义一个字段的时候的类型的写法. 比如: create table tab1 (f1 数据类型 ); 数据类型: 类型名[(长度n)] [unsigned] [zerofil ...
- 跟随我在oracle学习php(16)
数据库的增删改查 增:create database [if not exists ] 数据库名 [charset 字符集] [collate 字符排序规则]: 说明: 1,if n ...
- 跟随我在oracle学习php(15)
开发环境 独立开发环境:组成 Windows/Linux php Apache MySQL 集成开发环境:phpstudy wamp xammp 关系数据库: SQL: Struct Query La ...
- 跟随我在oracle学习php(14)
CSS3的@keyframes用法详解: 此属性与animation属性是密切相关的,关于animation属性可以参阅CSS3的animation属性用法详解一章节. 一.基本知识: keyfram ...
- 跟随我在oracle学习php(12)
DOM 文档对象模型 body:(什么时候)找到标签 操作标签找到标签:(都会返回一个js对象)document.getElementById() 通过iddocument.getElementsBy ...
- 跟随我在oracle学习php(11)
数组专题 数组遍历: 1,普通for循环,经常用的数组遍历 var arr = [1,2,0,3,9]; for ( var i = 0; i <arr.length; i++){ consol ...
随机推荐
- leetcode 66.加一 python3
class Solution: def plusOne(self, digits): """ :type digits: List[int] :rtype: List[i ...
- mongo 修改器
[$inc] 作用:修改器$inc可以对文档的某个值为数字型(只能为满足要求的数字)的键进行增减的操作. Example: db.b.update({"uid" : "2 ...
- ActiveMQ下载与安装(Linux环境下进行)
下载 官方网站:http:activemq.apache.org/ 安装(liunx) 1.将apache-activemq-5.12.0-bin.tar.gz(liunx环境下的压缩包)上传至服务器 ...
- rsync+sersync实现代码同步
APP02安装 rsync服务端 yum install rsync vim /etc/rsyncd.conf pid file=/var/rsynclog/rsyncd.pid log file=/ ...
- centos7 升级内核
rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org rpm -Uvh http://www.elrepo.org/elrepo-rel ...
- gulp插件实现压缩一个文件夹下不同目录下的js文件(支持es6)
gulp-uglify:压缩js大小,只支持es5 安装: cnpm: cnpm i gulp-uglify -D yarn: yarn add gulp-uglify -D 使用: 代码实现1:压缩 ...
- [opengl]Clion配置opengl
如何在Clion中编写Opengl程序 首先下载 GLAD GLFW 创建Clion工程 在工程中创建文件夹lib.dll.include文件夹 把下载下来的东西放入对应的文件夹 CMakeLists ...
- day3——两数之和
// 小白一名,0算法基础,艰难尝试算法题中,若您发现本文中错误, 或有其他见解,往不吝赐教,感激不尽,拜谢. 领扣 第2题 今日算法 题干 //给定一个整数数组和一个目标值,找出数组中和为目标值的两 ...
- js 延时等待
//延时器,2秒后执行函数 function test(){ alert("aaaa"); } setTimeout(function () { test(); }, ); //或 ...
- loadrunner中使用web_custom_request函数调用webservice接口
1.使用的接口地址: http://www.webxml.com.cn/WebServices/WeatherWebService.asmx?op=getWeatherbyCityName 以SOAP ...