【发布时间】:2021-07-09 21:40:09
【问题描述】:
我尝试将文本设置为白色,但它不起作用,为什么?
html.erb
<h1 class="text-3xl text-center pt-5 bg-green-800 text-white">Epicery</h1> <!-- here it works very well the text-white -->
<div class="flex pt-5 pb-5 bg-green-800">
<div class="mx-auto">
<ul class="flex">
<li class="mr-6 text-white"> <!-- here it does not work text-white -->
<a class="text-white text-sm hover:text-gray-900 hover:bg-white p-4 rounded" href="#">Link</a>
</li>
</ul>
</div>
</div>
我导入了顺风cdn
application.html.erb
<%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track': 'reload' %>
<%= javascript_pack_tag 'application', 'data-turbolinks-track': 'reload' %>
<link href="https://unpkg.com/tailwindcss@^2/dist/tailwind.min.css" rel="stylesheet">
【问题讨论】:
标签: html css ruby-on-rails tailwind-css