- 博客(27)
- 收藏
- 关注
原创 内层div的边框压在外层div的边框上
原理:(1)外层div比内层div大一个像素,外层div不能有overflow:hidden样式.无标题文档ul{ height:31px; border-bottom:1px solid #ccc; padding:0; margin:0; list-style:none}li{ height:30px; border-bottom:2px solid #f00;
2018-01-03 20:02:22
1027
转载 css3的半透明效果
引自:http://www.divcss5.com/css-hack/c574.shtmlfilter:alpha(Opacity=50);-moz-opacity:0.5;opacity:0.5;filter:alpha(Opacity=50) 对win IE设置半透明效果,火狐不认。-moz-opacity:0.5; 对火狐设置半透明效果,IE不认。
2018-01-02 12:44:11
5185
转载 js+CSS实现模拟华丽的select控件下拉菜单效果
转载于 http://www.jb51.net/article/71803.htm"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">模拟select控件 html,body{height:100%;overflow:hidden;}body,div,form
2017-10-11 10:54:50
1641
翻译 搜索验证js
function search_check() { document.charset="utf-8"; var sword =document.getElementById("searchword").value.replace(/^\s+|\s+$/g,""); if (sword=='' || sword=='请输入
2017-10-10 11:12:16
577
翻译 显示星期几的js
var day=""; var month=""; var ampm=""; var ampmhour=""; var myweekday=""; var year=""; mydate=new Date();//天气数组 myweekday=mydate.getDay();//取得日 mymonth=mydate.getMonth()+1;//取得月 myda
2017-10-10 10:27:12
275
转载 背景图片太大,显示不全
filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='1.jpg',sizingMethod='scale');
2017-09-29 15:33:31
5400
转载 背景图片全屏(背景图片没有撑满屏幕)
http://blog.youkuaiyun.com/u014374031/article/details/69258208
2017-09-29 15:33:00
2245
转载 响应式:在页面开头加入
meta name="viewport" content="width=device-width, initial-scale=1.0">
2017-09-29 15:32:20
367
转载 鼠标放上去图片会变大
http://blog.youkuaiyun.com/u014175572/article/details/51535768
2017-09-29 15:31:12
1958
转载 背景不跟窗口一块上下滑动
background:url(../images/462965.jpg) no-repeat center center fixed;background-size:cover;-webkit-background-size:cover;-moz-background-size:cover;-ms-background-size:cover;-o-background-size:cover;
2017-09-29 15:30:17
230
转载 怎样让不设宽度的ul居中
简单的方法必须是给UL设置一个宽度,然后margin:0 auto;但如果你非要不给他宽度的话就是给外面的DIV设置position:relative,然后给UL设置position:absolute; left:50%;top:0;margin-left:-x,这里的X是一个值,假如你的UL是一个固定的值如200,那这里就写-100px,但是你的UL又没有写宽度,那么你就只有拿值来试,试
2017-09-29 15:29:34
578
转载 li里面不换行
链接:http://blog.youkuaiyun.com/ystyaoshengting/article/details/45896043white-space:nowrap; //强制不换行overflow:hidden; //自动隐藏文字text-overflow: ellipsis; //文字隐藏后添加省略号-o-text-over
2017-09-29 15:28:11
2558
转载 去掉超链接点击时出现的虚线框(好像只有IE能识别)
a{outline:none:} A:active{star:expression(this.onFocus=this.blur());} A:focus{outline:0;}链接:http://blog.youkuaiyun.com/congcongsuiyue/article/details/16986355
2017-09-29 15:26:47
272
转载 10、去掉页面底端滚动条
Html,body{overflow:hidden;}https://zhidao.baidu.com/question/113180822.html
2017-09-29 15:25:13
324
转载 css3 阴影、文字旋转、圆角、投影
6、文字加阴影text-shadow:5px 2px 6px #000; http://www.divcss5.com/css3-style/c734.shtml文字旋转.nav a{display:inline-block;-webkit-transition: all 0.2s ease-in; -moz-transition: all 0.2s
2017-09-29 15:22:47
809
转载 .父元素透明不影响子元素
转载自 http://www.mamicode.com/info-detail-1313527.htmlfilter: alpha(opacity=50); /*设置ie透明度 */opacity:0.5; /* 设置火狐高版本透明度 */ -moz-opacity:.5; /* 设置火狐低版本透明度 */兼容IE:backgr
2017-09-29 15:20:10
281
转载 渐变效果
http://fangchan.news.baidu.com/background: -webkit-linear-gradient(rgba(0,0,0,0),rgba(0,0,0,.7)); background: -o-linear-gradient(rgba(0,0,0,0),rgba(0,0,0,.7));background: linear-gradient(rgba(0,
2017-09-29 15:17:56
237
转载 1、将select右边的小三角换成自己想要的样式
http://blog.youkuaiyun.com/java_zhaoyanli/article/details/52549787 1. select { 2. /*Chrome和Firefox里面的边框是不一样的,所以复写了一下*/ 3. border: solid 1px #000; 4. 5. /*很关键:将默认的select选择框样式清除*/ 6.
2017-09-29 15:14:06
8643
转载 输入小写变成大写
function myFunction(){var x=document.getElementById("fname");x.value=x.value.toUpperCase();}
2017-09-29 15:13:21
615
转载 鼠标放上去就清空文字
1. script> 2. function OnEnter( field ) { if( field.value == field.defaultValue ) { field.value = ""; } } 3. function OnExit( field ) { if( field.value == "" ) { field.value = field.defaultValue
2017-09-29 15:12:39
378
转载 跳转到新页面后上次点击时的样式依然保留
$('ul.main-menu li a').each(function(){ if($($(this))[0].href==String(window.location)) $(this).parent().addClass('active');});使用方法:将上面的jquery-1.9.1.min.js文件和script代码引入到页面中,然后将$后面括
2017-09-29 15:11:37
3150
原创 设为首页、加入收藏
//设为首页function SetHome(obj,vrl){ try{ obj.style.behavior='url(#default#homepage)';obj.setHomePage(vrl);}catch(e){ if(window.netscape) { try { netscape.security.PrivilegeManager.enablePrivile
2017-09-29 15:03:23
1179
原创 查看更多和收起的js
var serv1 = document.getElementById("job_intro_info");var aBtn1 = document.getElementById("job_intro_btn"); var serv = document.getElementById("company_service");var aBtn = document.getElem
2017-09-29 08:46:18
13256
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人