如何更改WordPress插件Watson助手聊天机器人的盒子大小?

时间:2021-04-24 作者:Aymal

如何更改Wordpress插件Watson Assistant聊天盒大小?下面的CSS代码将高度从下到上更改,但不会从上到下更改。我想将聊天机器人的大小从上到下减小,但我无法做到这一点。该代码是在wordpress的一个临时css部分编写的。

@media (min-width: 640px) {
#watson-float {
top: 0;
right: 0 !important;
}

#watson-box {
width: 35vw !important;
height: 95vh !important;
}

#message-container {
height: calc(100% – 2.75em) !important;
}
}
我想把盒子的大小改到红线。

enter image description here

1 个回复
SO网友:Aymal

根据您的意愿添加边距顶部并更改值。

  @media (min-width: 640px) {
      #watson-float {
            margin-top: 100px;
        top: 0;
        right: 0 !important;
      }
    
      #watson-box {
        width: -900% !important;
        height:100% !important;
      }
    
      #message-container {
        height: calc(100% - 2.75em) !important;
      }
    }

相关推荐

为什么NAV_MENU_css_CLASS不能与Apply_Filters一起使用?

我试图将css类添加到导航项中。记录的函数调用WordPress docs 是apply_filters( \'nav_menu_css_class\', string[] $classes, WP_Post $item, stdClass $args, int $depth ) 但我尝试在函数中添加以下内容。“我的孩子”主题中的php不起作用。apply_filters(\'nav_menu_css_class\', [\'nav-item\']); 但在函数中添加以下内容。php工作正