
div+css系列文摘
找到快乐的根源
这个作者很懒,什么都没留下…
展开
-
div 滚动条颜色控制
.left-side{/*div盒子宽高定义*/ height: 100%; width: 100px; overflow: auto; } .left-side::-webkit-scrollbar {/*滚动条整体样式*/ width: 5px; /*高宽分别对应横竖滚动条的尺寸*/ height: 10px; } .left-side::-webkit-scrollbar-thumb {/*滚动条里面小方块*/ border-radius: 10px; .原创 2021-12-24 13:01:07 · 527 阅读 · 0 评论 -
设置文字不换行,超过的部分用“...”代替
设置文字不换行,超过的部分用“...”代替 overflow:hidden; text-overflow:ellipsis; white-space:nowrap; width:210px; 除width属性外,顺序不要颠倒哦! 1.white-space ① normal 默认,空白会被浏览器忽略 ② pre 空白会被浏览器保留。其行为方式类似HTM...转载 2019-05-30 07:28:08 · 3093 阅读 · 0 评论 -
布局中 display:inline 于float 属性作用
display:inline 将div、li 等块状元素变为 类似 span 类型的 行内元素。主要用来做 横向布局使用,例如菜单等; 具体说明参考:http://www.divcss5.com/wenji/w472.shtml float属性 主要是针对图片排版,或div等容器布局,具体参考: http://www.runoob.com/try/try.php?filena...原创 2019-02-16 08:54:17 · 610 阅读 · 0 评论 -
OA系统中常用table样式列表
.table{width:100%;border-collapse:collapse; border-spacing:0; } .table th{border:1px #d2d2d2 solid;height:20px;line-height:20px;} .table td{border:1px #d2d2d2 solid;padding:5px 8px;} .table tr:nth-原创 2017-05-12 11:31:34 · 1376 阅读 · 0 评论 -
JS将人民币小写金额转换为大写
/** 数字金额大写转换(可以处理整数,小数,负数) */ function smalltoBIG(n) { var fraction = ['角', '分']; var digit = ['零', '壹', '贰', '叁', '肆', '伍', '陆', '柒', '捌', '玖']; var unit = [ ['元', '万', '亿'], [转载 2016-12-07 12:03:45 · 3452 阅读 · 0 评论 -
解决IE6、IE8 宽度兼容
一、!important 兼容ie6 因为ie7及其以上版本对!important的支持, 所以!important 方法就可以很好的用来做ie6的兼容了。(切记声明位置需要提前。) 例如: #right { width: 600px !important; /* ie7+ff */ width: 620px; /* ie6 */ } 二、css hack的方法 首先说明一下:转载 2012-10-08 22:19:23 · 4148 阅读 · 0 评论 -
list-style-type 属性设置
浏览器支持 所有浏览器都支持 list-style-type 属性。 注释:任何的版本的 Internet Explorer (包括 IE8)都不支持属性值 "decimal-leading-zero"、"lower-greek"、"lower-latin"、"upper-latin"、"armenian"、"georgian" 或 "inherit"。 可能的值 CSS2转载 2012-04-12 23:44:30 · 3253 阅读 · 0 评论 -
CSS 背景图片定位
我们在研究其他的网站的样式的时候经常会发现一种情况,就是在很多background属性里都调用同一张图片,来满足网页各个部分的使用。打开这种图片看一下,会发现这张图片上包含了很多小图片,比如: 又如: 查看原图(大图) 这些小图片就是整图分割后的各个部分,把各个部分放在一张图片上,而不是是分别存储成单独的图片,其目的我们都知道,就是减少http请求次数,节省时间和带宽。转载 2012-02-23 16:12:21 · 1708 阅读 · 0 评论 -
div 可移动层
可拉伸移动的DIV层,阿里西西整理收集 alixixi com /* DragResize v1.0 (c) 2005-2006 Angus Turnbull, TwinHelix Designs http://www.twinhelix.com Licensed under the CC-GNU LGPL, version 2.1 or later: http://creative原创 2011-12-30 22:22:39 · 2274 阅读 · 0 评论 -
解决IE6、IE8兼容的问题
解决IE7、IE8样式不兼容问题方法一、要在页面中加入如下HTTP meta-tag: 只要IE8一读到这个标签,它就会自动启动IE7兼容模式,保证页面完整展示。方法二、针对整个网站,在IIS中加入如下描述符就可以有相同的效果,当然这么做范围更广。原创 2011-02-22 11:29:00 · 787 阅读 · 0 评论 -
CSS控制鼠标形状
<br /><style type="text/css"><br /><!--<br />span {display:block;line-height:30px;margin:5px 0;background:#f0f0f0;text-align:center;}<br />--><br /></style><br /><span style="cursor:hand;">hand 手型</span><br /><span style="cursor:crosshair;">crosshair 十字</s原创 2010-12-22 11:49:00 · 785 阅读 · 0 评论 -
右下角(固定)弹出图层代码
<br />代码如下:<br /> <br /> <br /> <br /><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <br /><html xmlns="http://www.w3.org/1999/xhtml"> <br /><head> <br /><meta http-equiv="Content-T原创 2010-11-01 12:26:00 · 1579 阅读 · 1 评论 -
解决IE6不支持position:fixed的方法,非常简单
<br />解决IE6不支持position:fixed的方法,非常简单,具体调用请参考下面:<br /> <br /> <br />/*让position:fixed在IE6下可用! */<br /> <br />.fixed-top /* 头部固定 */{position:fixed;bottom:auto;top:0px;}<br />.fixed-bottom /* 底部固定 */{position:fixed;bottom:0px;top:auto;}<br />.fixed-left /* 左侧原创 2010-10-07 22:39:00 · 2808 阅读 · 0 评论