css布局实现消息提示层效果代码
代码语言:html
所属分类:布局界面
代码描述:css布局实现消息提示层效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <style> @import url("https://fonts.googleapis.com/css2?family=Cinzel&family=Poppins:wght@100;200;700;900&display=swap"); * { box-sizing: border-box; } body { font-family: "Poppins", sans-serif; font-size: 1.2rem; background: #ebebe3; background-color: #f3d060; background-size: 100%, 50px 50px; background-image: radial-gradient( circle at bottom right, #f3c050c0 0%, #f3d060c0 50% ), repeating-linear-gradient( 45deg, #1f2020 0, #1f2020 1.5px, #f3d060 0, #f3d060 50% ); margin: 0; padding: 0 1rem; display: grid; grid-gap: 3rem; place-content: center; min-height: 100vh; } .note { padding: 2rem; padding-left: 3rem; border: 3px solid; border-radius: 3px; box-shadow: 6px 6px 0px; background-color: #aee1cd; position: relative; font-weight: 700; } .note:before { position: absolute; content: "i"; top: 0.2rem; left: 0.2rem; width: 0.5rem; height: 0.5rem; padding: 0.5rem; border: 2px solid #000; display: grid; place-content: center; font-weight: 900; background-color: #5eb0e5; animation: shake 1s linear 10; box-shadow: 0px 4px 0px -3px #000, 4px 0px 0px -3px #000, 0px -4px 0px -3px #000, -4px 0px 0px -3px #000; } @keyframes shake { 10%, 90% { transform: translate3d(-1px, 0, 0) rotate(-5deg); } 20%, 80% { transform: translate3d(2px, 0, 0) rotate(10deg); } 30%, 50%, 70% { transform: translate3d(-3px, 0, 0) rotate(-15deg); } 40%, .........完整代码请登录后点击上方下载按钮下载查看
网友评论0