* { margin:0; padding:0; } .d1 { width:100%; height:600px; background:#000; position:relative; } .zhezhao { position:absolute; top:0; left:0; width:100%; height:100%; } .zhezhao { background:rgba(0,0,0,.1); } .font { position:absolute; top:0; left:140px; bottom:0; margin:auto 0; font-size:55px; height:70px; width:max-content; color:#fff; z-index:2; text-align:left; } .font::after { content:''; display:inline-block; width:2px; height:100%; background:#fff; position:absolute; top:0; right:-5px; animation:dh .8s ease-in-out infinite; } @keyframes dh { 0% { opacity:0; } 50% { opacity:1; } 100% { opacity:0; } }
打字机,新手都看得懂的写法