感谢老师的提醒,效果实现了,但是却发现不了自己在哪设置的隐藏。一直对base.css很疑惑

感谢老师的提醒,效果实现了,但是却发现不了自己在哪设置的隐藏。一直对base.css很疑惑

css.css到按钮部分代码


.header-top{

    min-width1152px;

    height150px;

    background-color: rgb(228187187);

}

.A{

    min-width1152px;

    height32px;

    background-color#2A2A2A ;

    line-height32px;

}

.header-top .A .center-wrap{

  

}

.header-top .A .center-wrap .right .iconfont{

    floatright;

    margin-right16px;

    line-height32px;

}

.header-top .A .center-wrap .right .iconfont:first-child{

    margin-right0;

}


.header-top .A .center-wrap .right .dr,.zc{

    font-size12px;

    color#FFFFFF;

    text-alignjustify;

    line-height32px;

}

.header-top .A .center-wrap .A1{

    floatleft;

    

}

.header-top .A .center-wrap .A1ulli{

    /* 大于号表示父亲的第一任儿子 */

    font-size14px;

    floatleft;

    margin-right18px;

    

}

.header-top a{

    font-family: PingFangSC-Regular;

   

    color#FFFFFF

    text-alignjustify;

    line-height18px;

}

.header-top .A .center-wrap .A1ulli.a1{

    /* li里面本身的一个a1元素用交集 */

    

    padding-right:12px;

    positionrelative;

    

}

.header-top .A .center-wrap .A1>ul>li.a1 .menu{

    /* 应该用top这样盒子就会在a1顶部往下延伸 */

    positionabsolute;

    top:32px;

    left0;

    width121px;

    

    background-color:rgba(0,0,0,0.20) ;

    displaynone

    box-shadow0 4px 8px 0;

    z-index9999;

}

.header-top .A .center-wrap .A1>ul>li.a1 .menu .menua2{

    width72px;

}

.header-top .A .center-wrap .A1>ul>li.a1 .menu .menua2 a{

    colorblack;

}



.header-top .A .center-wrap .A1>ul>li.a1 .menu .menua3{

    

}

.header-top .A .center-wrap .A1>ul>li:hover .menu{

    displayblock;

}


.header-top .A .center-wrap .A1ulli.a1 .B{

    positionabsolute;

    right0;

    top50%;

    margin-top-6px;

    width12px;

    height12px;

    

    transition: transform 0.2s linear 0s;

}

.header-top .A .center-wrap .A1ulli.a1:hover .B{

    transform:rotate(180deg)

}

/* 先两个盒子使用绝对定位然后微调,然后大盒子hover,

    之后控制大盒子transition旋转速度 */

.header-top .A .center-wrap .A1ulli.a1 .B .aa1{

    positionabsolute;

    left2px;

    top4px;

    width6px;

    height6px;

    background-color: rgb(248248246);

    transform: rotate(45deg);

}

.header-top .A .center-wrap .A1ulli.a1 .B .aa2{

    positionabsolute;

    top2px;

    left2px;

    width6px;

    height6px;

    background-color#2A2A2A;

    transform: rotate(45deg);

}


.main-nav{

    min-width1152px;

    background-color#20BD9A;

    height40px;

}

.main-nav .center-wrap ul li{

    floatleft;

    margin-right18px;

    line-height40px;

    font-size16px;

    positionrelative;

}

.main-nav .center-wrap ul li .ddwl{

    positionabsolute;

    width172px;

    top:40px;

    left0;

   background-color: rgb(207231100);

   displaynone;

    

    z-index9999;

}

.main-nav .center-wrap ul li .ddwl a{

    /* 自己权重上a标签不要写错了 */

    colorblack;

}

.main-nav .center-wrap ul li:hover .ddwl{

    displayblock;

}

.main-nav .center-wrap ul li{

    padding-right16px;

}

.main-nav .center-wrap ul li .b1{

    positionabsolute;

    right0;

    top50%;

    margin-top0px;

    /* transparent透明色 */

    border8px solid transparent;

    border-top-color:white;

    border-bottomnone;

    transition: transform 0.2s linear 0s;

}

.main-nav .center-wrap ul li:hover .b1{

    transform: rotate(180deg);

}

.log-area{

    height78px;

    background-color#fff;

}

.log-area h1{

    floatleft;

    font-size24px;

    color#20BD9A;

    text-alignjustify;

    line-height78px

    margin-right20px;

}

.log-area input{

    floatleft;

    width373px;

    height30px;

    opacity0.3;

    border1px solid #20BD9A;

    border-radius8px 0 0 8px;

    margin-top24px;

    /* 取消默认的外线(外线是文本框特有的东西) */

    outlinenone;

}

.log-area .iconfont{

    floatleft;

    margin-top24px;

    width32px;

    height30px;

    background-color#20BD9A;

    border-radius0 4px 4px 0;

    font-size20px;

    text-aligncenter;

    line-height30px;

}

.banner{

    positionrelative;

    width100%;

    height100%;

    

}


.banner img{

    

    min-width1152px;

    width100%;

    height100%;

    /* 这是一个小技巧,添加后就不会产生小缝隙了 */

    vertical-alignmiddle;

}


.banner .center-wrap{

    positionabsolute;

    background-color: rgb(216240145);

    width1152px;

    height100%;

    top0;

    left50%;

    margin-left:-576px;

    //隐藏可见

    //overflowvisible;

    

    

}

.banner .center-wrap .left-btn{

    positionabsolute;

    width28px;

    height44px;

    background:url(../images/icons.png) no-repeat -21px -94px;

    left:-38px;

    top50%;

    margin-top-22px;

}

.banner .left-btn:hover{

    opacity0.8;

}

.banner .right-btn{

    positionabsolute;

    width28px;

    height44px;

    /* 精灵技术先导入图片 */

    background:url(../images/icons.png) no-repeat -21px -29px;

    right0px;

    top50%;

    margin-top-22px;

    

}

.banner .right-btn:hover{

    opacity0.8;

}


base.css里面的设置


.clearfix {

    overflowhidden;

}

/* 给这个类名赋予了清除浮动的功能 */

.clearfix::after {

    content'';

    displayblock;

    clearboth;

    overflowhidden;

}

p{

    margin0;

    padding0;

}


.tac {

    text-aligncenter;

}

/* 给这个类名赋予了居中的功能 */

.center-wrap {

    width1152px;

    margin0 auto;

}


.db {

    displayblock;

}


.dib {

    displayinline-block;

}

a {

    text-decorationnone;

}

body{

    font-family: PingFangSC-Regular;

}

@font-face {

    font-family'iconfont';

    src: url('font/iconfont.eot');

    src: url('font/iconfont.eot?#iefix') format('embedded-opentype'),

        url('font/iconfont.woff2') format('woff2'),

        url('font/iconfont.woff') format('woff'),

        url('font/iconfont.ttf') format('truetype'),

        url('font/iconfont.svg#iconfont') format('svg');

  }

.iconfont {

    font-family"iconfont" !important;

    font-size16px;

    font-stylenormal;

    -webkit-font-smoothingantialiased;

    -moz-osx-font-smoothinggrayscale;

  }

img{

     displayblock;

 }

在这里输入代码,可通过选择【代码语言】突出显示

正在回答

登陆购买课程后可参与讨论,去登陆

1回答

同学你好,base.css里面存放重设浏览器默认的样式和通用的css样式,这样能减少代码量,使代码更精简,复用率提高;同学在使用这个base.css的时候,如果没有使用里面的类名.clearfix的话,是不会影响到页面效果的。同学的代码效果实现了,建议先不去纠结自己在哪里设置了样式,老师建议同学把出现问题的部分,单独拎出来多练习几遍,这样效果做的多了,以后再遇到类似的问题,就能够很好的把问题解决掉;

祝学习愉快!

  • Vigorous阿炎 提问者 #1
    感谢你们的耐心解答,特别感动!问题解决了,自己知识面也得到了进一步的扩展
    2020-11-15 19:10:15
问题已解决,确定采纳
还有疑问,暂不采纳

恭喜解决一个难题,获得1积分~

来为老师/同学的回答评分吧

0 星
请稍等 ...
意见反馈 帮助中心 APP下载
官方微信

在线咨询

领取优惠

免费试听

领取大纲

扫描二维码,添加
你的专属老师