css美化radio单选按钮实现动画效果代码

代码语言:html

所属分类:表单美化

代码描述:css美化radio单选按钮实现动画效果代码

代码标签: css 美化 radio 单选 按钮 动画

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

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

<head>
  <meta charset="UTF-8">

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

* {
	margin: 0;
	padding: 0;
}

body {
	display: flex;
	justify-content: center;
	align-items: center;
	min-height: 100vh;
	font-family: "Poppins", serif;
	text-transform: uppercase;
	font-size: 1rem;
	font-weight: 500;
	color: #9f01fc;
	background: linear-gradient(135deg, #f6f8fd 0%, #f1f4f9 100%);
}

fieldset {
	border: 2px solid #9f01fc;
	padding: 2rem 4rem;
	border-radius: 1.5rem;
}

label {
	margin-right: 15px;
	line-height: 32px;
}

input {
	appearance: none;
	width: 20px;
	height: 20px;
	border: 2px solid #d59af7;
	transition: 0.2s all linear;
	margin-right: 5px;
	position: relative;
	top: 6px;
	cursor: pointer;
	border-radius: 0.2rem;
}

legend {
	padding: 0.5rem 1rem;
	font-size: 1.2rem;
	font-weight: 700;
}

input:checked {
	border: 10px solid #9f01fc;
}

#cranky:checked {
	animation: wiggle 1s infinite;
}

#sleepy:checked {
	animation: sleep 2s alternate infinite;
}

#fearful:checked {
	animation: shake 0.1s infinite;
}

#drunk:checked {
	animation: stagger 2s forwards ease-in-out;
}

#dreamy:checked {
	animation: float 10s ease-in-out infinite alt.........完整代码请登录后点击上方下载按钮下载查看

网友评论0