* { margin:0; padding:0; } body { display:flex; justify-content:center; align-items:center; min-height:100vh; background-color:#1b2838; } ul { list-style-type:none; position:relative; } li { background:#67c1f5; position:absolute; transform:translate(-50%,-50%); } .setDiv { padding:10px 20px; position:absolute; background:rgba(62,126,167,0.8); box-shadow:0 0 3px rgba(0,0,0,0.4); color:#c6d4df; transition:all 400ms ease; text-align:center; font-size:18px; top:-45px; -webkit-user-select:none; } .callSetDiv { position:fixed; height:10%; width:300px; top:0; } .callSetDiv:hover+.setDiv,.setDiv:hover { top:5%; }
更新时间:2020-04-08 09:48:05
可自定义参数