摘要: 强制不换行div{white-space:nowrap;}自动换行div{word-wrap: break-word;word-break: normal;}强制英文单词断行div{word-break:break-all;}============================================CSS设置不转行:overflow:hidden 隐藏white-space:normal 默认pre 换行和其他空白字符都将受到保护nowrap 强制在同一行内显示所有文本,直到文本结束或者遭遇 br 对象设置强行换行word-break:normal ; 依照亚洲语言和非亚洲语言的 阅读全文
posted @ 2013-05-30 17:36 萌小孩 阅读(147) 评论(0) 推荐(0)
摘要: 1.页面内容居中01body{02margin:0auto;03}2.单行文字图标居中01div {02height:25px;03line-height:25px;04}05//也就是给height和line-height同样的高度,再用margin-bottom来细调。3.当网页字体小于12px时 chrome内核浏览器始终显示为12px01body{02-webkit-text-size-adjust:none;/*for chorme*/03}4.ie6双倍margin的bug01#box{02float:left;03width:100px;04margin:000100px; // 阅读全文
posted @ 2013-05-30 15:46 萌小孩 阅读(131) 评论(0) 推荐(0)
摘要: INPUT文本框在不同浏览器下的表现我们将一个INPUT文本框字符宽度设置为30,代码如下:< input id="demo1" name="demo1" type="text" size="30">从外观上看,IE各版本浏览器显示长宽是一样的,都为220x21px,但是边框样式上有所不同。Chrome、Firefox、Safari、Opera的长宽以及边框则各不相同。其实INPUT在不同浏览器中的区别远不止这些,每个浏览器为了保证网页在没有样式表的情况下能够正常显示,它们都自带了一套默认的CSS样式表 阅读全文
posted @ 2013-05-30 15:45 萌小孩 阅读(295) 评论(0) 推荐(0)
摘要: 让竖条没有:<bodystyle=`overflow:-Scroll;overflow-y:hidden`></body>让横条没有:<bodystyle=`overflow:-Scroll;overflow-x:hidden`></body>2个都去掉<bodyscroll="no"></body> 阅读全文
posted @ 2013-05-27 20:11 萌小孩 阅读(139) 评论(0) 推荐(0)
摘要: ie6如需要定义一个元素的100%高度,必须先指定其父元素一个具体的高度,而如果父元素直接就是body的话,还必须指定html的高度为100%/*普通元素*/#parent {height:500px;}#child {height:100%;}/*父级元素为body元素*/html{height:100%;}body{min-height:100%;height:auto !important;height:100%;}#fullLength {height:100%;} 阅读全文
posted @ 2013-05-27 19:46 萌小孩 阅读(164) 评论(0) 推荐(0)
摘要: <html><head><metahttp-equiv="Content-Type"content="text/html; charset=utf-8"/><title>CSS TAB</title><styletype="text/css">/*重置body, a, ul样式*/body{margin:0;background:#fff;}a{text-decoration:none;font-size:13px;color:#000;}ul{margin:0; 阅读全文
posted @ 2013-05-27 19:45 萌小孩 阅读(212) 评论(0) 推荐(0)
摘要: <IFRAMEID="iFrame1"SRC="iframe.htm"allowTransparency="true"style="background-color: green"></IFRAME> 阅读全文
posted @ 2013-05-27 19:44 萌小孩 阅读(168) 评论(0) 推荐(0)
摘要: oncontextmenu="window.event.returnValue=false" 将彻底屏蔽鼠标右键<tableborderoncontextmenu=return(false)><td>no</table> 可用于Table<bodyonselectstart="return false"> 取消选取、防止复制onpaste="return false" 不准粘贴oncopy="return false;" oncut="return fals 阅读全文
posted @ 2013-05-27 19:42 萌小孩 阅读(498) 评论(0) 推荐(1)
摘要: body {font-family:微软雅黑;padding:0;margin:0;font-size:12px;}#wrap {margin-left:auto;margin-right:auto;width:940px;} 阅读全文
posted @ 2013-05-27 19:41 萌小孩 阅读(99) 评论(0) 推荐(0)
摘要: textarea{overflow:auto;} 阅读全文
posted @ 2013-05-27 19:41 萌小孩 阅读(258) 评论(0) 推荐(0)