js实现文字背景颜色调整对比效果代码
代码语言:html
所属分类:其他
代码描述:js实现文字背景颜色调整对比效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<style>
:root {
--bg1: #fd5;
--bg2: #fd5;
--fg1: #000;
--fg2: #fff;
}
* {
box-sizing: border-box;
}
body {
height: 100vh;
display: flex;
justify-content: center;
align-items: center;
font: normal 19px/1.5 helvetica, sans-serif;
}
.container {
width: 500px;
height: 400px;
position: relative;
}
.top {
position: absolute;
top: -48px;
font-size: 0.7em;
}
.top h3 {
margin: 0;
padding: 0;
margin-bottom: 0.5em;
color: #333;
display: inline-block;
}
.top label {
margin-left: 1.15em;
}
.top input {
margin-left: 0.1em;
}
.bottom {
position: relative;
width: 500px;
height: 400px;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
.bottom .left, .bottom .right {
position: absolute;
top: 0;
left: 0;
height: 400px;
overflow: hidden;
}
.bottom .left .content, .bottom .right .content {
width: 500px;
padding: 3em;
}
.bottom .left {
width: 50%;
max-width: 100%;
min-width: 10px;
resize: horizontal;
z-index: 1;
-webkit-animation: demo 4.5s 1;
animation: demo 4.5s 1;
}
.bottom .........完整代码请登录后点击上方下载按钮下载查看
















网友评论0