哭:你见过最糟糕的代码长什么样子?

接手了一个前端,从来没这么糟心过。贴下代码

改一行代码,我想死的心都有!!!!!简单的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;
}

啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊。不是编译工具生成的,这么多>选择器想做什么。。。。

  • 1.本站主要是为了记录工作、学习中遇到的问题,可能由于本人技术有限,有些不正确的地方,仅供参考。
  • 2.本站中会转载我认为有用的博客文章,添加一些外链网站地址,但这些博客文章、论坛和网站上的内容和我没有关系,不代表我的意见,请网友自己多注意辨别。
  • 3.本站中转载文章会写明来源(点击下方链接按钮即可),感谢原作者的辛苦写作,如果有异议,及时联系我处理,谢谢!
  • 4.欢迎指出有问题的地方,我会尽快修正,谢谢!

系统由 Nginx + Next.js + React + Node + TailWindCss 驱动

沪ICP备20021316号