jquery+css实现8款精美带指针走动的精美数字时钟效果代码

代码语言:html

所属分类:其他

代码描述:jquery+css实现8款精美带指针走动的精美数字时钟效果代码

代码标签: jquery css 8款 精美 指针 走动 精美 数字 时钟

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

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

<head>
  <meta charset="UTF-8">
  
  
<style>
@import url("https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap");

body {
  background: #f5f5f5;
  min-height: 100vh;
  margin: 0;
  padding: 40px 0;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
  color: #333;
}

h1 {
  font-weight: 600;
  font-size: 2.5rem;
  color: #101828;
	text-align: center;
	display: block;
	margin-top: 1em;
	margin-bottom: 1em;
	font-weight: bold;
}

.container {
  display: flex;
  gap: 40px;
  padding: 20px;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center

}

.card {
  background: white;
  border-radius: 24px !important;
  padding: 30px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  text-align: center;
  position: relative;
  width: 356px;
  height: 426px;
  display:flex;
  align-items: center;
  justify-content: center
}

.card::after {
  content: attr(data-description);
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: #F5F5F5;
background: linear-gradient(0deg,rgba(245, 245, 245, 1) 0%, rgba(245, 245, 245, 0.8) 39%, rgba(255, 255, 255, 0) 100%);
  color: #191919;
  padding: 30px;
  font-size: 1rem;
  line-height: 1.5;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  z-index: 12;
  height: calc(100% - 60px);
  border-radius: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(8px);
}

.card:hover::after {
  opacity: 1;
}

.card h2 {
  margin-top: 0;
  margin-bottom: 8px;
  color: #333;
  font-weight: 500;
  position: absolute;
  top: 40px;
  left: 0;
  text-align: center;
    width: 100%;
  display:block;
  z-index: 99
}

.card p {
  margin-top: 0;
  margin-bottom: 20px;
  color: #666;
  font-size: 14px;
}

.clock-container {
  position: relative;
  width: 280px;
  height: 280px;
  margin: 0 auto;
  display:flex;
  align-items: center;
  justify-content: center;
  margin-top: 40px
}

.clock-face {
  position: absolute;
  width: 280px;
  height: 280px;
  border-radius: 50%;
}

.hour-marks {
  position: absolute;
  width: 100%;
  height: 100%;
}

.hour-mark {
  position: absolute;
  left: 50%;
  transform-origin: 0 140px;
}

.minute-mark {
  position: absolute;
  left: 50%;
  transform-origin: 0 140px;
}

.hour-number {
  position: absolute;
  text-align: center;
  transform-origin: center;
}

.hand {
  position: absolute;
  transform-origin: bottom cente.........完整代码请登录后点击上方下载按钮下载查看

网友评论0