纯css实现卡片悬浮切换效果
代码语言:html
所属分类:选项卡
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title> Awesome-css-card-hover-effect </title> <style> body { background-color: red; } .page_title { text-align: center; color: whitesmoke; text-transform: uppercase; font-weight: 100; font-size: 50px; } .container { /* background:whitesmoke; */ border-radius: 10pt; display: flex; justify-content: center; align-items: center; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); } .box { position: relative; width: 370px; height: 270px; background: white; margin: 15px; box-sizing: border-box; border-radius: 10px; overflow: hidden; box-shadow: 0px 0px 50px -15px; text-align: center; transition: 0.5s; } .box:hover { box-shadow: 0px 0px 100px -5px #000; /* border:2px double white; */ transform: scale(1.1); transition: 1s; } .box .intro { box-sizing: border-box; text-align: center; font-size: 4rem; /* background-color:red; */ /* background:linear-gradient(0deg,red,purple,cyan) no-repeat; */ height: 100vh; position: absolute; width: 370px; height: 270px;.........完整代码请登录后点击上方下载按钮下载查看
网友评论0