问题
console.log(([])?true:false);
console.log(([]==false?true:false));
两个div横排
法1、 父div display:flex
法2、都 float:right float:left
CSS五种方式实现Footer置底
https://segmentfault.com/a/1190000008516654
position 以及参数总结
-
position: relative;不会脱离文档流,position: fixed;position: absolute;会脱离文档流
-
position: relative; 相对于自己在文档流中的初始位置偏移定位。
-
position: fixed; 相对于浏览器窗口定位。
-
position: absolute; 是相对于父级非position:static 浏览器定位。
如果没有任何一个父级元素是非position:static属性,则会相对于文档定位。
这里它的父级元素是包含爷爷级元素、祖爷爷级元素、祖宗十八代级元素的。任意一级都可以。
如果它的父级元素和爷爷级元素都是非position:static 属性,则,它会选择距离最近的父元素。
网站常会用到一些 下拉菜单,,幻灯片,,,飘浮广告等。
但经常会发现。幻灯片会挡住下拉菜单或者飘浮广告等。解决办法有下
第一,可将幻灯片所在DIV 置于最底层。添加CSS如下
style=“z-index:-100;position: relative;”
第二,可将被挡住的DIV/ul/li 置于最高层。添加CSS如下
style=“z-index:9999;position: relative;”
js鼠标事件
https://www.cnblogs.com/rubylouvre/archive/2009/08/24/1552862.html
css图片水平居中
利用margin: 0 auto实现图片水平居中
Access to XMLHttpRequest at 'http://39.105.145.102:3000/api/essayList' from origin 'http://localhost:8080' has been blocked by CORS policy:
No 'Access-Control-Allow-Origin' header is present on the requested resource
常见的HTML事件
http://www.runoob.com/jsref/dom-obj-event.html