随笔分类 - div+css
div+css
摘要:1.div 绝对居中 { width:xxpx; height: xxpx; position: absolute;top: 50%; left: 50%;transform: translate(-50%,-50%); } 2.angular zg-zoor 遇到的坑:angular必须与对应版本
阅读全文
摘要:querySelector() 方法返回匹配指定 CSS 选择器元素的第一个子元素 。 querySelectorAll() 方法返回文档中匹配指定 CSS 选择器的所有元素 var x = document.getElementById("myDIV"); x.querySelector(".de
阅读全文
摘要:1.将字体文件(后缀.ttf)考到项目中。2.css @font-face { font-style: normal; font-family: DS-Digital; src: url("../images/DS-DIGIB.TTF");}div{ font-family: DS-Digital;
阅读全文
摘要:$(window).resize(function ()// 绑定到窗口的这个事件中 { var whdef = 100/1920;// 表示1920的设计图,使用100PX的默认值 var wH = window.innerHeight;// 当前窗口的高度 var wW = window.inn
阅读全文
摘要:/*input*/input[type=checkbox]{background:url("../images/no.png") center no-repeat; height: .32rem;width:.35rem;display:inline-block;vertical-align:top
阅读全文
摘要:用两个class做背景图 .active .div{} 点击事件加在li上,样式写在active下的div里 $('.labelbox li').click(function() { $(this).toggleClass('active'); });
阅读全文
摘要:<div class="footer"></div> jquery $('.footer').load('footer.html');
阅读全文
摘要:width:265px; height:130px; display:table-cell; vertical-align:middle; text-align:center;
阅读全文
摘要:1.解决方法 给弹层加个高度height:100%;然后overflow-y:auto; .choseareaWrap { position: fixed; top: 0; width:100%; height:100%; overflow:auto; z-index:9999; backgroun
阅读全文
摘要:.ecordTable { table-layout:fixed; width:1020px;}
阅读全文
摘要:<textarea name="textarea" cols="" title="contactForm" class="textarea" onFocus="if(value == '填写详细需求'){value=''}" onBlur="if(!value){value=defaultValue
阅读全文
摘要:/* css*/ input[type="checkbox"] { -webkit-appearance: none; background: url('../images/AgentService/default.jpg') no-repeat; height: .17rem; vertical-
阅读全文
摘要:其实用下列CSS就可以解决,原理是将浏览器默认的下拉框样式清除,然后应用上自己的,再附一张向右对齐小箭头的图片即可。 select { /*Chrome和Firefox里面的边框是不一样的,所以复写了一下*/ border: solid 1px #000; /*很关键:将默认的select选择框样式
阅读全文
摘要:鼠标形状鼠标形状放上变为放大镜鼠标形状放上变为缩小镜
阅读全文
摘要:input { display: block; height: 34px; padding: 6px 12px; font-size: 14px; line-height: 1.42857143; color: #555; background-color: #fff; background-im...
阅读全文
摘要:解决办法:灰常简单,只需给ul添加样式ul{overflow: auto;}即可
阅读全文
摘要:canvas IE9以上版本支持 Checkbox Small Checkbox Big
阅读全文
摘要:radio IE9以上版本支持 Radio Small Radio Big
阅读全文
摘要:1.旋转 div 元素:div{transform:rotate(7deg);-ms-transform:rotate(7deg); /* IE 9 */-moz-transform:rotate(7deg); /* Firefox */-webkit-transform:rotate(7deg...
阅读全文
摘要:取决于浏览器或者设备的方向,HTML元素总是会有"portrait"(竖屏) "landscape"(横屏) class. 你可以在css中如下使用它们:.portrait {/* 垂直方向的变化的代码 */}.landscape {/* 水平方向的变化的代码 */}
阅读全文
浙公网安备 33010602011771号