V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
Can I use?
http://caniuse.com/
Less
http://lesscss.org
Cool Libraries
Bootstrap from Twitter
Jetstrap
zxCoder
V2EX  ›  CSS

刚开始学 tailwindcss,请问这个 css 要怎么写

  •  
  •   zxCoder · 2021-05-14 23:05:29 +08:00 · 1923 次点击
    这是一个创建于 1048 天前的主题,其中的信息可能已经有所发展或是发生改变。
    ul::after {
    		content: '';
    		display: block;
    		clear: both;
    	}
    
    ul:after{
        @apply block clear-both
    }
    

    剩下 content 不知道怎么加,目前是重新写了一个ul:after{content: ''},如果两个合并在一起 postcss 编译就出错了

    5 条回复    2021-08-05 15:58:40 +08:00
    bxb100
        1
    bxb100  
       2021-05-14 23:22:03 +08:00
    tailwind does not support pseudo-elements.
    bxb100
        2
    bxb100  
       2021-05-14 23:26:41 +08:00
    anguiao
        3
    anguiao  
       2021-05-14 23:52:52 +08:00
    ul:after {
    content: '';
    @apply block clear-both;
    }

    这样应该可以
    molvqingtai
        4
    molvqingtai  
       2021-05-15 08:23:04 +08:00 via Android
    正确的写法是抛弃 flaot
    XTTX
        5
    XTTX  
       2021-08-05 15:58:40 +08:00
    我觉得有点本末倒置了,tailwind 是给了我一些方便的 class,直接使用,这不意味着我要把所有 css 都改成 tailwind 规范的。index.css @tailwind 后面加入自己的 class 不香吗? 方正 tailwind 被 compile 完了,后面还是 css
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   5503 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 26ms · UTC 08:56 · PVG 16:56 · LAX 01:56 · JFK 04:56
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.