摘要:
JavaScript中是没有整型概念的,但利用好位操作符可以轻松处理,同时获得效率上的提升。 |0和~~使用这两者可以将浮点转成整型且效率方面要比同类的parseInt,Math.round 要快。 在JavaScript中“&&”和“||”是逻辑运算符;“&”和“|”是位运算符。 (10 / 3) 阅读全文
posted @ 2020-12-03 15:44
大海博客
阅读(113)
评论(0)
推荐(0)
摘要:
.container{ width: calc(100% - 50px); } calc() 函数用于动态计算长度值。 需要注意的是,运算符前后都需要保留一个空格,例如:width: calc(100% - 10px); 任何长度值都可以使用calc()函数进行计算; calc()函数支持 "+", 阅读全文
posted @ 2020-12-03 15:16
大海博客
阅读(245)
评论(0)
推荐(0)
摘要:
div { box-shadow: 0 0 0 6px rgba(0, 0, 0, 0.2), 0 0 0 12px rgba(0, 0, 0, 0.2), 0 0 0 18px rgba(0, 0, 0, 0.2), 0 0 0 24px rgba(0, 0, 0, 0.2); height: 2 阅读全文
posted @ 2020-12-03 15:09
大海博客
阅读(47)
评论(0)
推荐(0)
摘要:
文字模糊效果 color: transparent; text-shadow: #111 0 0 5px; 毛玻璃效果 .blur { display: block; width: 300px; height: 300px; margin: 100px auto; filter: blur(10px 阅读全文
posted @ 2020-12-03 15:03
大海博客
阅读(25)
评论(0)
推荐(0)
摘要:
function urlParse(url, key) { var a = document.createElement('a') a.href = url var result = { href: url, protocol: a.protocol.replace(':', ''), port: 阅读全文
posted @ 2020-12-03 14:53
大海博客
阅读(119)
评论(0)
推荐(0)
浙公网安备 33010602011771号