![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
css
机器猫zhao
这个作者很懒,什么都没留下…
展开
-
文字超出变为省略号
{CSDN:CODE:core}原创 2016-10-31 13:23:45 · 501 阅读 · 0 评论 -
css布局系列 -- (二)宽度或高度不固定垂直居中和水平居中
1.高度不固定-单个元素垂直居中<div class="box"> <div class="content">高度不固定</div></div>.box{ background: #f0f0f0; height: 400px; position: relative;}/*缺点:要用到 transform ,兼容性...原创 2018-06-28 17:52:40 · 1536 阅读 · 0 评论 -
css布局--垂直水平居中
一般兼容性较好的垂直水平居中有三种:1.容器内元素为内联元素或内联块元素,并且只有单行文字时<div class="box"> <span>我是内联元素</span></div>.box { text-align:center; height:40px; line-height:40px; background:red;}2....原创 2018-06-28 17:24:34 · 215 阅读 · 0 评论 -
IE7/IE8实现css圆角效果
HTML代码: 赵幸培css代码:*{margin:0;padding:0;}.zxp{width:100px;height:100px;line-height:100px;position:relative;overflow:hidden;}.z-radius{position:absolu原创 2016-10-11 16:24:05 · 3617 阅读 · 2 评论 -
创建各种三角形-css
.triangle { width: 0; height: 0; border-top: 20px solid #EEB422; border-right: 20px solid #C0FF3E; border-bottom: 20px solid #A020F0; border-left: 20px solid #7CFC00; }原创 2017-09-21 10:56:20 · 281 阅读 · 0 评论 -
圆点围绕圆旋转---css3
Document *{ margin: 0; padding: 0; } .box{ position: relative; width: 300px; height: 300px; border: 5px solid deepskyblue; border-radius: 50%; } .box i{ display: bl原创 2017-08-23 15:19:54 · 10669 阅读 · 0 评论 -
圆等分成三个扇形菜单
Document *{ margin: 0; padding: 0; } .box{ position: relative; width: 536px; height: 536px; border-radius: 50%; overflow: hidden; } .box .s1{ width: 400px; heigh原创 2017-08-23 15:31:10 · 1109 阅读 · 0 评论 -
css一些兼容问题
1、下拉框样式/*清除ie的默认选择框样式清除,隐藏下拉箭头*/select::-ms-expand { display: none; }//清除火狐和谷歌下的默认下拉三角,加上自己想要的背景图片select{ -webkit-appearance: none; -moz-appearance: none; -ms-progress-appearance原创 2017-05-15 17:39:22 · 268 阅读 · 0 评论 -
css之品字布局
1、品字布局(每块都有固定宽高)品字布局*{margin:0; padding:0;}div{ width:100px; height:100px; background:red; font-size:40px; line-height:100px; color:#fff; text-align:center;}.div1{ margin:50px auto 0;}.div2原创 2016-11-25 10:38:21 · 5741 阅读 · 0 评论 -
css之float详解
浮动float属性值:left:元素向左浮动right:元素向右浮动none:默认值。元素不浮动。inhert:规定从父元素继承float的属性值;浮动会让元素本身脱离文档流,对后面的元素会产生影响,会让后面元素文字环绕到浮动元素上。 Document *{ margin: 0; padding: 0; } .bo原创 2016-11-23 14:51:19 · 2333 阅读 · 0 评论 -
css布局系列 -- (一)多个元素垂直居中和水平居中
1、多个元素水平居中<div class="box"> <span>1</span> <span>2</span> <span>3</span></div>body{ margin: 0;}html,body{ width: 100%;原创 2018-06-28 17:40:57 · 8020 阅读 · 0 评论