当前位置:网站首页>Tailwind核心理念——响应式设计
Tailwind核心理念——响应式设计
2022-04-21 13:28:00 【_雪菜肉丝面_】
响应式设计
就是会根据屏幕的大小调整页面。
举例:
<div class="grid grid-flow-row md:grid-flow-col">
<div class="text-4xl ring-1">1</div>
<div class="text-4xl ring-1">2</div>
<div class="text-4xl ring-1">3</div>
<div class="text-4xl ring-1">4</div>
</div>
<div class="w-full text-4xl ring-1">内容</div>
grid:grid布局。
grid-flow-row:自动放置,行方向。
md:grid-flow-col:宽度为md以上时,自动放置,列方向。
text-4xl:文字大小。
ring-1:轮廓线。
w-full:满宽。
效果:

内置的五个前缀:

何为移动端优先?
就是优先考虑小屏幕,默认最小。
每当宽度大于某个值了,就生效那个断点。
案例当中,行排列是最小的,列排列次之。故:
grid-flow-row:行排列,不加前缀,默认情况。
md:grid-flow-col:列排列,加前缀,屏幕大于768才会触发。
如何自定义?
比如,只有在640到768的范围内,才会显示出来。
block:display为block。
hidden:display为none。
在配置中弄:
theme: {
screens: {
"justsm": {
'min': '640px', 'max': '767px'}
}
}
然后使用它:
<div class="hidden justsm:block ">你好,世界!</div>
hidden:就是hidden。
justsm:block:只有在640到768的范围内,才会block。
效果:

版权声明
本文为[_雪菜肉丝面_]所创,转载请带上原文链接,感谢
https://blog.csdn.net/qq_37284843/article/details/124316312
边栏推荐
- How to open a securities account for goucai? Is it safer to open an account in a securities firm?
- twenty million two hundred and ten thousand eight hundred and twelve
- [digital signal processing] linear constant coefficient difference equation (use matlab to solve the example of "linear constant coefficient difference equation" | a vector analysis | B vector analysi
- Fibonacci sequence
- 动手篇 | 如何在麒麟v10 SP2安装达梦8版本数据库
- Redis data persistence
- 14 tips for making your code better
- Navlinkmatch of blazor's navlink What does prefix do
- 让你的代码更优秀的 14 条建议
- Establishment of binary tree and its cueing
猜你喜欢

网易数帆王佰平:我的 Envoy Maintainer 之路

万字干货!帮你深度掌握设计中的「光影」知识点

Wanzi dry goods! Help you deeply master the knowledge points of "light and shadow" in design (Part 2)

Required. The red asterisk disappears after entering the content

Initial response Kit
![[UVM] multi module env structure](/img/2e/6c1f322539443152a84d6a88572bcb.jpg)
[UVM] multi module env structure

Industry video super resolution new benchmark, Kwai & Dalian research, boarded CVPR 2022

leetcode:824. 山羊拉丁文【简单字符串操纵】

科技巨头竞相入场,谁能成为元宇宙“头号玩家”?

Actual ora2pg is migrated from Oracle11g to PG12 four
随机推荐
What about first-class insurance? Is there a charge? What are the waiting requirements?
Flash-1.12.0 yarn installation and deployment
无线网络协议名词
What is the Intel quartus prime, the introduction to digital IC tools? What's the difference between the three versions
[UVM] multi module env structure
让你的代码更优秀的 14 条建议
How to open a securities account for goucai? Is it safer to open an account in a securities firm?
53W words! Ali's first system performance optimization guide is so fragrant that it can be called the optimal solution of performance optimization
L2-013 红色警报 (25 分)
Can great talents be of little use? Oceanbase integration scenario test
[C#]给地球来点光
After the completion of hundreds of millions of yuan of financing, smart bank plans to land urban intelligent driving products in more than 100 cities
Detailed explanation and demonstration of 3-4dom shaped XSS
Xcode Cloud 入门:拉取请求 (PR) 工作流程
Technology giants compete to enter, who can become the "number one player" of the meta universe?
制造业中小企业转型能力建设分享
Upgrade the jdbc driver to version 8.0.28 and connect the pit record of MySQL
MySQL使用安装pip和binlog2sql
[digital signal processing] correlation function (energy signal | cross correlation function of energy signal | autocorrelation function of energy signal)
SSM高校实验室安全培训系统设计与实现.docx