重构项目,风格与新版百度 UI 适配

This commit is contained in:
mengkunsoft
2020-06-21 19:43:39 +08:00
parent d76352630e
commit d3d9587cfb
11 changed files with 511 additions and 420 deletions

View File

@@ -1,259 +1,339 @@
@charset "utf-8";
div, span, p, a, img, footer, html, body, button, h1, h2, h3, h4, h5, input {
font-family: "Helvetica Neue", Helvetica, Microsoft Yahei, Hiragino Sans GB, WenQuanYi Micro Hei, sans-serif;
html, body,
div, section, header, footer,
button, input, textarea,
p, ul, li {
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: Microsoft Yahei, "微软雅黑", "Helvetica Neue", Helvetica, Hiragino Sans GB, WenQuanYi Micro Hei, sans-serif;
}
img {
outline: none;
}
.anim-trans {
-webkit-transition: .3s ease all;
-moz-transition: .3s ease all;
-o-transition: .3s ease all;
transition: .3s ease all;
html, body {
width: 100%;
height: 100%;
overflow-x: hidden;
}
/* 鼠标指针箭头 */
/* 搜索框 */
#search {
position: relative;
height: 40%;
min-height: 314px;
max-height: 510px;
margin: 0 auto;
text-align: center;
}
#search-form {
position: absolute;
width: 100%;
bottom: 0;
}
.search-form-group {
position: relative;
max-width: 655px;
margin: 0 auto;
}
.search-form-input {
position: absolute;
left: 0;
right: 108px;
vertical-align: top;
overflow: hidden;
}
.search-form-input input {
width: 100%;
height: 44px;
padding: 12px 16px;
font-size: 16px;
outline: 0;
box-shadow: none;
border-radius: 10px 0 0 10px;
border: 2px solid #c4c7ce;
border-right: none;
background: #fff;
color: #222;
}
.search-form-group input:hover {
border-color: #9195a3;
}
.search-form-group input:focus {
border-color: #4e6ef2;
}
.search-form-group button {
cursor: pointer;
width: 108px;
height: 44px;
line-height: 45px;
padding: 0;
background: #4e6ef2;
border-radius: 0 10px 10px 0;
font-size: 17px;
color: #fff;
box-shadow: none;
font-weight: 400;
border: none;
outline: 0;
float: right;
z-index: 1;
}
.search-form-group button:active {
background-color: #4662d9;
}
.search-form-group button:hover {
background-color: #4662d9;
}
.search-header {
position: absolute;
bottom: 60px;
width: 100%;
}
.search-header h2 {
font-size: 24px;
font-weight: 900;
}
.search-header img {
display: inline-block;
width: 270px;
margin: 0 -12px -16px;
}
/* 功能区 */
#function {
position: absolute;
width: 100%;
top: 40%;
text-align: center;
margin-top: 80px;
}
#tips {
color: #9195a3;
font-size: 16px;
}
#stop {
display: none;
border: none;
padding: 8px 15px;
border-radius: 100px;
color: #bababa;
background: #f1f1f1;
outline: none;
cursor: pointer;
margin-top: 50px;
}
#output {
display: none;
width: 100%;
max-width: 400px;
margin: 20px auto;
}
#output textarea {
width: 100%;
padding: 5px 8px;
border-radius: 3px;
border: 1px solid #c8c8c8;
outline: none;
}
#output textarea:focus {
border-color: #4285f4;
box-shadow: 0 0 2px #4285f4;
}
#output .tool-btns {
text-align: right;
margin-top: 8px;
}
#output button {
outline: none;
cursor: pointer;
color: #fff;
background: #3f89ec;
border: none;
margin-left: 8px;
padding: 6px 14px;
border-radius: 3px;
}
#output button:hover {
background: #4490f7;
}
#output button:focus {
background: #3a84e8;
}
/* 页脚 */
#footer {
width: 100%;
position: fixed;
z-index: 100;
bottom: 0;
left: 0;
height: 40px;
line-height: 40px;
font-size: 12px;
overflow: hidden;
background-color: #fafafa;
padding: 0 20px;
}
#footer li {
list-style: none;
display: inline-block;
float: left;
padding: 0 10px;
}
.footer-left, .footer-left a {
color: #9195a3;
text-decoration: none;
}
.footer-right {
float: right;
}
.footer-right, .footer-right a {
color: #bbb;
}
/* 鼠标指示箭头 */
#arrow {
display: none;
position: absolute;
left: 0;
top: 0;
width: 50px;
height: 50px;
z-index: 999;
background: url(../img/arrow.png) no-repeat;
}
/* 关于按钮 */
.about {
#arrow::after {
content: '';
position: absolute;
top: 1em;
right: 1em;
height: 1.5em;
line-height: 1.5em;
width: 1.5em;
border-radius: .75em;
font-size: 16px;
text-align: center;
color: #fff;
background-color: #000;
background-color: rgba(0,0,0,.05);
cursor: pointer;
}
.about:hover {
background-color: #000;
background-color: rgba(0, 0, 0, 0.26);
}
/*弹窗层*/
.mk-pop-box {
z-index: 9999;
margin-bottom: 2px;
display: none;
position: fixed;
font-size: 14px;
width: 100%;
max-width: 350px;
}
.mk-pop-box-inner {
background: #fff;
border-radius: 3px;
border-top: 2px solid #fa7f40;
padding: 18px;
}
/* 弹窗标题 */
.mk-pop-box-title {
font-size: 18px;
text-align: center;
font-weight: normal;
color: #333;
margin-bottom: 10px;
}
/* 弹窗主体内容 */
.mk-pop-box-content {
margin-bottom: 13px;
}
.mk-pop-box-content p, .mk-pop-box-content p a {
font-size: 14px;
color: #808080;
text-decoration: none;
line-height: 20px;
line-height: 1.6em;
margin-bottom: 10px;
}
.mk-pop-box-content p a:hover {
color: #fa7f40;
}
/* 弹窗中的按钮 */
.mk-pop-box-btn {
cursor: pointer;
margin: 0 auto;
min-width: 50px;
outline: none;
text-align: center;
border-radius: 2px;
display: block;
height: 34px;
line-height: 35px;
padding: 0 40px;
font-size: 14px;
background: #ff8140;
border: 1px solid #f77c3d;
color: #fff;
box-shadow: 0px 1px 2px rgba(0,0,0,0.25);
}
.mk-pop-box-btn:hover {
background: #f7671d;
border: 1px solid #f06923;
}
/* 弹窗遮罩层 */
.mk-pop-box:before {
content: "";
color: #C7EDCC;
background-color: #000;
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
opacity: 0.59;
-ms-filter: progid:DXImageTransform.Microsoft.Alpha(Opacity = 59);
filter: alpha(opacity = 59);
top: -13px;
left: -15px;
z-index: -1;
}
/* 页面主体部分 */
.container {
height: 500px;
width: 100%;
text-align: center;
padding: 10px;
}
/* 大标题 */
.title {
padding-top: 100px;
padding-bottom: 26px;
}
.baidu-logo {
height: 100px;
margin-bottom: -20px;
}
/* 搜索表单 */
.mk-search-form {
max-width: 650px;
margin: 0 auto;
font-size: 16px;
}
.mk-search-form input {
float: left;
padding: 0 6px;
width: 77%;
height: 37px;
border: 1px solid #d8d8d8;
border-right-color: transparent;
line-height: 37px;
font-size: 1em;
}
.mk-search-form input:focus {
border: 1px solid #3385ff;
border-right-color: transparent;
outline: none;
}
.mk-search-form button {
cursor: pointer;
border: none;
background-color: #3385ff;
color: white;
position: relative;
overflow: visible;
width: 23%;
height: 37px;
text-transform: uppercase;
font-size: 1em;
}
.mk-search-form button:hover {
background-color: #317ef3;
box-shadow: 1px 1px 1px #ccc;
}
/* 提示语 */
#instructions {
display: inline-block;
margin-top: 40px;
padding: 30px 2px;
color: #999999;
font-size: 20px;
}
/* 生成输出框 */
#output-box {
display: none;
}
.btn {
display: inline-block;
width: 100px;
height: 35px;
line-height: 38px;
margin: 0 10px;
background-color: #3385ff;
color: white;
text-align: center;
font-size: 0.8em;
border: none;
cursor: pointer;
}
.btn:hover {
opacity: 0.8;
}
/*链接框*/
#output-link {
width: 300px;
border-radius: 9em;
box-shadow: 0 0 0 7px rgba(0,0,0,.4);
width: 30px;
height: 30px;
font-size: 25px;
margin-bottom: 20px;
vertical-align: middle;
opacity: 0;
}
/* 页脚 */
.copyright, .copyright a {
color: #999;
text-align: center;
text-decoration: none;
font-size: 14px;
#arrow.active::after {
-webkit-animation: bubble-scale 1s ease;
animation: bubble-scale 1s ease;
}
@-webkit-keyframes bubble-scale {
from {
transform: scale(0);
opacity: 1
}
to {
transform:scale(2);
opacity: 0
}
}
@keyframes bubble-scale {
from {
transform: scale(0);
opacity: 1
}
to {
transform: scale(2);
opacity: 0
}
}
/* 响应式优化 */
@media screen and (max-width: 666px) {
.title {
@media screen and (max-width: 650px) {
#search {
margin: 0 10px;
height: auto;
min-height: 200px;
}
.search-header img {
width: 180px;
margin: 0 -16px -12px;
}
#search-form {
bottom: 10px;
border: 1px solid #363636;
}
.search-form-input {
right: 81px;
}
.search-form-input input {
border: none;
border-radius: 0;
padding: 12px;
}
.search-form-group button {
width: 81px;
height: 44px;
padding: 0 10px;
border: none;
border-left: 1px solid #e8e8e8;
border-radius: 0;
font-size: 16px;
font-weight: 400;
padding-top: 100px;
font-weight: 700;
line-height: 46px;
white-space: nowrap;
letter-spacing: -1px;
color: #38f;
background: #fff;
}
.baidu-logo {
height: 50px;
margin: 0 5px -8px;
.search-form-group button:active {
background-color: #fdfafa;
}
.mk-search-form {
font-size: 14px;
.search-form-group button:hover {
background-color: #fdfafa;
}
#instructions {
font-size: 14px;
#function {
position: relative;
top: 0;
margin-top: 50px;
padding: 0 10px;
}
#output-box {
#stop {
margin-top: 30px;
}
/* 链接框 */
#output-link {
width: 100%;
height: 30px;
font-size: 20px;
margin-bottom: 20px;
vertical-align: middle;
#footer {
padding: 0;
}
#arrow {
background: url(../img/hand.png) no-repeat;
}
}