简体   繁体   English

如何在引导程序上使文本颜色响应?

[英]How do I make the text color responsive on bootstrap?

I am new to designing websites and bootstrap.我是设计网站和引导程序的新手。 Here goes my first question- I have created a website using bootstrap.这是我的第一个问题-我使用引导程序创建了一个网站。 I want a particular text to change it's color from white to black to make it legible when viewed on a mobile phone.我希望将特定文本的颜色从白色更改为黑色,以便在手机上查看时清晰易读。 Is there anyway I can do that?反正我能做到吗?

Use can make use of the concept of media queries for the same.使用同样可以利用媒体查询的概念。

Change the width for mobile screen in the below code.在下面的代码中更改移动屏幕的宽度。

 div { color: red; } @media screen and (max-width: 480px) { div { color: green; } }
 <div>Test</div>

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM