哭:你见过最糟糕的代码长什么样子?
接手了一个前端,从来没这么糟心过。贴下代码
改一行代码,我想死的心都有!!!!!简单的css与html.....
<div class="page-header">
<div class="fixed_header"></div>
<!-- <div class="fixed_section"></div> -->
<div class="fixed-view">
<div class="fixed_header">
<div class="left-view-type1">
<a href="javascript:;">下载APP</a>
<div class="vertical-line"></div>
<a href="javascript:;">注册新闻号</a>
</div>
<div class="right-view">
<div class="vertical-line"></div>
<a href="javascript:;">投诉反馈</a>
<div class="vertical-line"></div>
<a href="javascript:;">关于新闻</a>
</div>
</div>
</div>
</div>
.page-header .fixed_header{
height: 36px;
}
.page-header .fixed_section{
height: 80px;
}
.page-header>.fixed-view{
position: fixed;
top: 0;
left: 0;
z-index: 99;
width: 100%;
box-shadow: 0px 12px 11px -9px rgba(206, 206, 206, 0.5);
}
.page-header>.fixed-view>.fixed_header{
background: #222222;
width: 100%;
}
.page-header>.fixed-view>.fixed_header>._section_width{
width: 100%;
height: 100%;
display: flex;
align-items: center;
justify-content: space-between;
}
.page-header>.fixed-view>.fixed_header>._section_width>.left-view-type1{
width: 1px;
flex: 1 1 auto;
margin-right: 12px;
height: 100%;
display: flex;
align-items: center;
justify-content: flex-start;
}
.page-header>.fixed-view>.fixed_header>._section_width>.left-view-type1>a,
.page-header>.fixed-view>.fixed_header>._section_width>.right-view>a{
color: rgba(255,255,255,0.8);
font-size: 16px;
flex-shrink: 0;
}
.page-header>.fixed-view>.fixed_header>._section_width>.left-view-type1>.vertical-line,
.page-header>.fixed-view>.fixed_header>._section_width>.right-view>.vertical-line{
width: 1px;
height: 100%;
flex-shrink: 0;
background: #424242;
margin: 0 16px 0 10px;
}
.page-header>.fixed-view>.fixed_header>._section_width>.right-view{
height: 100%;
display: flex;
align-items: center;
justify-content: flex-start;
}
.page-header>.fixed-view>.fixed_header>._section_width>.right-view>.account-view{
height: 100%;
position: relative;
flex-shrink: 0;
}
.page-header>.fixed-view>.fixed_header>._section_width>.right-view>.account-view>.header{
flex-shrink: 0;
height: 100%;
display: flex;
align-items: center;
justify-content: flex-start;
}
.page-header>.fixed-view>.fixed_header>._section_width>.right-view>.account-view>.header>span{
color: rgba(255,255,255,0.8);
font-size: 16px;
line-height: 100%;
}
.page-header>.fixed-view>.fixed_header>._section_width>.right-view>.account-view>.header>img{
width: 28px;
height: 28px;
border-radius: 50%;
margin-right: 6px;
}
.page-header>.fixed-view>.fixed_header>._section_width>.right-view>.account-view>.section{
position: absolute;
bottom: 0;
left: 0;
transform: translateY(100%);
box-sizing: border-box;
background: #FFFFFF;
display: none;
width: 100%;
box-shadow: 0px 2px 8px 2px rgba(210, 210, 210, 0.5);
max-height: 200px;
overflow: auto;
}
.page-header>.fixed-view>.fixed_header>._section_width>.right-view>.account-view>.section>.item{
padding: 10px 6px;
box-sizing: border-box;
color: #252525;
font-size: 12px;
line-height: 18px;
cursor: pointer;
user-select: none;
width: 100%;
text-align: center;
}
.page-header>.fixed-view>.fixed_header>._section_width>.right-view>.account-view:hover>.section{
display: block;
}
.page-header>.fixed-view>.fixed_header>._section_width>.left-view-type2{
width: 1px;
flex: 1 1 auto;
margin-right: 12px;
height: 100%;
display: flex;
align-items: center;
justify-content: flex-start;
}
.page-header>.fixed-view>.fixed_header>._section_width>.left-view-type2>.item{
flex-shrink: 0;
color: rgba(255,255,255,0.8);
font-size: 16px;
margin-left: 30px;
cursor: pointer;
user-select: none;
}
.page-header>.fixed-view>.fixed_header>._section_width>.left-view-type2>.item:nth-of-type(1){
margin-left: 0;
}
.page-header>.fixed-view>.fixed_header>._section_width>.left-view-type2>.item2{
margin-left: 14px;
position: relative;
padding: 0 16px;
box-sizing: border-box;
cursor: auto;
height: 100%;
}
.page-header>.fixed-view>.fixed_header>._section_width>.left-view-type2>.item2>.header{
height: 100%;
display: flex;
align-items: center;
justify-content: center;
}
.page-header>.fixed-view>.fixed_header>._section_width>.left-view-type2>.item2>.header>img{
width: 8px;
transform-origin: center center;
transform: translateY(2px) rotateZ(-90deg);
margin-left: 4px;
}
.page-header>.fixed-view>.fixed_header>._section_width>.left-view-type2>.item2:hover>.header>img{
transform: translateY(2px) rotateZ(90deg);
}
.page-header>.fixed-view>.fixed_header>._section_width>.left-view-type2>.item2>.section{
position: absolute;
bottom: 0;
left: 0;
transform: translateY(100%);
box-sizing: border-box;
background: #FFFFFF;
display: none;
width: 100%;
max-height: 200px;
overflow: auto;
box-shadow: 0px 2px 8px 2px rgba(210, 210, 210, 0.5);
}
.page-header>.fixed-view>.fixed_header>._section_width>.left-view-type2>.item2>.section>.item{
padding: 10px 6px;
box-sizing: border-box;
color: #252525;
font-size: 12px;
line-height: 18px;
cursor: pointer;
user-select: none;
width: 100%;
text-align: center;
}
.page-header>.fixed-view>.fixed_header>._section_width>.left-view-type2>.item2:hover>.section{
display: block;
}
.page-header>.fixed-view>.fixed_section{
background: #FFFFFF;
}
.page-header>.fixed-view>.fixed_section>._section_width{
width: 100%;
height: 100%;
display: flex;
align-items: center;
justify-content: space-between;
}
.page-header>.fixed-view>.fixed_section>._section_width>.left-view{
width: 1px;
flex: 1 1 auto;
display: flex;
align-items: center;
justify-content: flex-start;
}
.page-header>.fixed-view>.fixed_section>._section_width>.left-view>.logo{
width: 112px;
flex-shrink: 0;
margin-right: 46px;
}
.page-header>.fixed-view>.fixed_section>._section_width>.left-view>.text-view{
color: #252525;
font-size: 24px;
line-height: 32px;
width: 1px;
flex: 1 1 auto;
}
.page-header>.fixed-view>.fixed_section>._section_width>.left-view>.text-view>span{
color: #979797;
}
.page-header>.fixed-view>.fixed_section>._section_width>.right-view{
margin-left: 30px;
width: 348px;
flex-shrink: 0;
height: 44px;
border-radius: 3px;
background: #F5F6F7;
display: flex;
align-items: center;
justify-content: flex-start;
overflow: hidden;
}
.page-header>.fixed-view>.fixed_section>._section_width>.right-view>input{
width: 1px;
flex: 1 1 auto;
height: 100%;
border: none;
outline: none;
padding: 0 14px;
box-sizing: border-box;
font-size: 14px;
color: #252525;
background: rgba(0,0,0,0);
}
.page-header>.fixed-view>.fixed_section>._section_width>.right-view>.secah-button{
height: 100%;
width: 80px;
background: #3391FF;
flex-shrink: 0;
display: flex;
align-items: center;
justify-content: center;
}
.page-header>.fixed-view>.fixed_section>._section_width>.right-view>.secah-button>img{
width: 18px;
}