每天一个JS 小demo之新建文件夹。主要知识点:DOM方法的综合运用
document body { margin: 0; } header { border-bottom: 2px solid #000; height: 40px; line-height: 40px; text-align: center; } .file { margin: 20px; float: left; position: relative; width: 100px; height: 110px; border-radius: 5px; border: 1px solid rgba(0, 0, 0, 0); background: url(img/file.png) no-repeat center 25px; cursor: pointer; } .file input { position: absolute; left: 3px; top: 3px; display: none; } .fileName { position: absolute; left: 5px; bottom: 10px; width: 90px; font: 12px/20px Arial,"宋体"; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .fileShow { border: 1px solid #000; background-color: #f1f1f1; } .fileShow input { display: block; } .info { position: fixed; left: 0; top: 0; width: 100%; height: 50px; font: 30px/50px "宋体"; text-align: center; transform: translateY(-50px); background: #ccc; }
以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持考高分网。



