简体   繁体   English

我想在tailwindcss中添加我自己的css。 它不适应

[英]I want to add my own css in tailwindcss. It is not adapted

I'm using next.js and tailwinds.我正在使用 next.js 和顺风。
I want to hide the scroll bars.我想隐藏滚动条。
I wrote a style to hide scrollbars in style.css, but it is not applied.我在style.css中写了一个隐藏滚动条的样式,但是没有应用。

@import 'tailwindcss/base';
@import 'tailwindcss/components';
@import 'tailwindcss/utilities';
body::-webkit-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
  display: none;
}

You are suppose to extend it like this:您应该像这样扩展它:

@layer base {
    body::-webkit-scrollbar {
        -ms-overflow-style: none;
        scrollbar-width: none;
        display: none;
    }
}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 我的样式未在 Tailwindcss 中呈现。 有人可以帮我理解造成这种情况的原因吗? - My style is not rendering in Tailwindcss. Can someone help me understand the cause of this? 我想为孩子班级添加CSS - I want to add css for my child class 如何将自己的自定义CSS和HTML添加到Prestashop? - How can I add my own custom css and html to Prestashop? 如何将自己的CSS样式添加到CKEditor - How can I add my own CSS styles to CKEditor 在sitecore中,我可以在哪里添加自己的自定义CSS? - In sitecore, where can I add my own custom CSS? 如何将自己的 css 添加到 laravel 背包 - how do I add my own css to laravel backpack 我想将 CSS 添加到我的 php 代码中。怎么做? - I want to add CSS to my php code.How to do it? 我想在jQuery和css中为我的菜单项添加一个子元素 - I want to add a sub element to my menu items in jQuery and css 如何将我自己的图像添加到以HTML和CSS链接到另一个网站的按钮? - How do i add my own image to a button that links to another website in HTML & CSS? 我想在tailwindcss中添加之前和之后的伪元素,但它没有显示? - I want to add pseudo-element like before and after in tailwindcss but it's not showing?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM