donglaohua1671 2016-03-21 04:18
浏览 54
已采纳

在HTML中自定义CSS

I've got a Wordpress site using WooCommerce, and I've got a plugin that isn't working how it should. So, I managed to find a particular line in the PHP code that triggers when I need it to do something my way. Problem is, I need to change some CSS styling within the PHP code.

How exactly would one do something like this?

<woocommerce class="a.button.alt"><style>background: #FF8282; pointer-events: none;</style></h1>
<woocommerce class="button.button.alt"><style>background: #FF8282; pointer-events: none;</style></h1>

Mind you that code above is incorrect. It is just an example of what I'm trying to achieve.

As for a more detailed breakdown, I'm trying to change/override a CSS style that already exists on my web page. Overall, the trick is to change some CSS style that already exists into doing something else. The CSS for the item I found (from Firefox's HTML debugger/inspector) is:

.woocommerce #respond input#submit.alt, .woocommerce a.button.alt, .woocommerce button.button.alt, .woocommerce input.button.alt

And I need it to apply these styles instead:

background: #FF8282;
pointer-events: none;

If you need more information, just let me know.

Thank you.

  • 写回答

4条回答 默认 最新

  • dousong4777 2016-03-21 07:57
    关注

    SOLVED

    I included in the logic that was tripping some PHP code:

    include '/wp-content/themes/my_theme/400.css';
    

    And that CSS file (400.css) contained:

    <style>
        .woocommerce a.button.alt { background: #FF8282 !important; pointer-events: none !important; }
    </style>
    

    Thank you everyone for your help. Much appreciated.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(3条)

报告相同问题?

悬赏问题

  • ¥15 设计一个温度闭环控制系统
  • ¥100 关于加载卡的问题有能知道这个要怎么处理吗?
  • ¥100 rtmpose姿态评估
  • ¥15 java 通过反射找路径下的类,打包后就找不到
  • ¥15 通联支付网上收银统一下单接口
  • ¥15 angular有偿编写,
  • ¥15 centos7系统下abinit安装时make出错
  • ¥15 hbuildex运行微信小程序报错
  • ¥15 关于#python#的问题:我知道这个问题对你们来说肯定so easy
  • ¥15 wpf datagrid如何实现多层表头