文字动画菜单导航效果

代码语言:html

所属分类:菜单导航

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

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">

<style>
@import url(https://fonts.googleapis.com/css?family=Lato);
body {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  background: black;
}

.float-text-menu {
  display: flex;
  flex-direction: column;
  list-style-type: none;
}
.float-text-menu li a {
  display: flex;
  padding: 6px;
  color: white;
  font-family: Lato, sans-serif;
  text-decoration: none;
  overflow: hidden;
}
.float-text-menu li a span {
  position: relative;
  transition: 0.3s;
}
.float-text-menu li a span::before {
  position: absolute;
  content: attr(data-text);
  transform: translateY(130%);
}
.float-text-menu li a:hover span {
  transform: translateY(-130%);
}
</style>

</head>
<body translate="no">
<ul class="float-text-menu">
<li><a href="#" data-text=.........完整代码请登录后点击上方下载按钮下载查看

网友评论0