css实现卡片悬浮显示全图文字效果代码

代码语言:html

所属分类:悬停

代码描述:css实现卡片悬浮显示全图文字效果代码

代码标签: 悬浮 显示 全图 文字 效果

下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开


<!DOCTYPE html>
<html lang="en" >

<head>

  <meta charset="UTF-8">


  
  
<style>
@import url("https://fonts.googleapis.com/css2?family=Exo:wght@600&display=swap");

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  width: 100vw;
  min-height: 100vh;

  display: flex;
  justify-content: center;
  align-items: center;
  font-family: "Exo", Arial, sans-serif;
  background-color: #151522;
}

.cards {
  width: 100%;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
}

.card--1 .card__img,
.card--1 .card__img--hover {
  background-image: url("//repo.bfw.wiki/bfwrepo/image/5e323253cf4d2.png");
}

.card--2 .card__img,
.card--2 .card__img--hover {
  background-image: url("//repo.bfw.wiki/bfwrepo/image/600d657ecf5ce.png");
}

.card__clock {
  vertical-align: middle;
  fill: #ad7d52;
}

.card__time {
  color: #ad7d52;
  vertical-align: middle;
}

.card__clock-info {
  float: right;
}

.card__img {
  visibility: hidden;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  width: 100%;
  height: 235px;
  border-top-left-radius: 12p.........完整代码请登录后点击上方下载按钮下载查看

网友评论0