1./隐藏元素还占位/
div{
display: none;
position: absolute; left:-1000px;
/后两种会变的无作用/
visibility: hidden; opacity: 0;
}
2.//制作一个三角形
div{
border: 20px solid transparent;
border-bottom-color: #821134;
position: absolute;
}
或者 矩形div旋转,”◆“这个字符
3.//元素居中
left:50%;
margin-left:-20px;
backface-visibility:hidden|visible定义元素在背箱屏幕时是否可见
自己下载的字体位置
*忘了
4.定义图标字体
@font-face{ font-family: "Raphaelicons"; src: url('./fonts/raphaelicons-webfont.eot') format('eot'), url('./fonts/raphaelicons-webfont.ttf') format('truetype'), url('./fonts/raphaelicons-webfont.woff') format('woff'), url('./fonts/raphaelicons-webfont.svg') format('svg'); font-weight: normal; font-style: normal; } div:after{ content: attr(data-icon); position: absolute; width: 100px; height: 100px; background-color: blue; color: white; font-family: "Raphaelicons"; font-size: 90px; }
5.ul 默认带上下边距一个字符
’