[英]How to implement styles or sass / css modules in react sticky table
I'm trying react-sticky-table third party library.我正在尝试react-sticky-table第三方库。 It is not accepted CSS or styles.
不接受 CSS 或 styles。 but some styling or CSS elements work react-sticky-table.
但是一些样式或 CSS 元素可以使用 react-sticky-table。 it is not accepting the styling fully
它不完全接受样式
I want to fully access the CSS and styling properties and elements in react-sticky-table.我想完全访问 CSS 以及 react-sticky-table 中的样式属性和元素。 So how to solve it?
那么如何解决呢?
If you have any other solution, please refer to it here.如果您有任何其他解决方案,请在此处参考。
package link: https://www.npmjs.com/package/react-sticky-table package 链接: https://www.npmjs.com/package/react-sticky-table
demo link https://henrybuilt.github.io/react-sticky-table/?path=/story/basic--basic演示链接https://henrybuilt.github.io/react-sticky-table/?path=/story/basic--basic
I faced CSS or SASS styling is not working in react sticky table.我遇到了 CSS 或 SASS 样式在反应粘性表中不起作用。 Actually react sticky table works perfectly.
实际上反应粘性表完美无缺。 If you using css / sass modules in your react app, you need to access global style of react stick table.
如果您在反应应用程序中使用 css / sass 模块,则需要访问反应棒表的全局样式。
How to access global style?如何访问全局样式? you may use
:global
pseudo selector, You will be achieved the global styles in css / sass module.您可以使用
:global
伪选择器,您将在 css / sass 模块中实现全局 styles。
If you use normal css / sass (without module), you don't need to specify the :global
pseudo-selector.如果您使用普通的 css / sass(不带模块),则不需要指定
:global
伪选择器。 Because normal css / sass is global style.因为普通的 css / sass 是全局样式。
Otherwise we can achieve inline css styles否则我们可以实现内联 css styles
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.