• 让CSS某行不失效


    比如百度的分享代码

    <div id="bdshare" class="bdshare_t bds_tools get-codes-bdshare">
    已经定义好了CSS,我想用自己的CSS,但是去掉bdshare_t bds_tools get-codes-bdshare,分享代码就失效了,我想让bdshare_t bds_tools get-codes-bdshare不执行CSS的部分

    解决办法:

    这个是css样式的优先级问题,可以在自己的css样式里面加上 !important,加了important的优先级最高,会覆盖其他的同属性的样式,例如 原来font-size:12px
    你自己写的 font-size:14px!important 那么结果是14px

  • 相关阅读:
    npm
    模块化开发
    Html input 标签
    H5 移动端布局
    Mysql指令
    php面向对象
    git指令
    css3 属性
    如何渲染数据
    angular 服务
  • 原文地址:https://www.cnblogs.com/zhouj850/p/9390362.html
Copyright © 2020-2023  润新知