如何根据浏览器大小设置响应跨度宽度 [英] How do I set responsive span width based on browser size
本文介绍了如何根据浏览器大小设置响应跨度宽度的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我的代码仅适用于桌面。
< div class = span3 dashboard-blocks >
< h3 > 当前员工< / h3 >
< b 样式 = font-size :16px; > (@ Model.EmployeeCount)< / b > & nbsp;& nbsp; |
@ Html.ActionLink(查看,列表,员工)< br >
< br >
< / div >
我想显示span6作为移动类,但是span3适用于更大的屏幕尺寸。
我该怎么做才能帮助我谢谢...
我尝试过的事情:
< div class = span3 dashboard-blocks >
< h3 > 当前员工< / h3 >
< b style = font-size:16px; > (@Model.EmployeeCount)< / b > 跨度> |
@ Html.ActionLink(查看,列表,员工)< br >
< br >
< / br > < / br > < / div >
解决方案
使用媒体查询 - CSS | MDN [ ^ 一>]。
I have this code that is for desktop only.
<div class="span3 dashboard-blocks">
<h3>Current Employees </h3>
<b style="font-size:16px;">(@Model.EmployeeCount)</b> |
@Html.ActionLink("View", "List", "Employee")<br>
<br>
</div>
I want to show span6 for as class for mobile but span3 for larger screen size.
How can i do that please help me thanks...
What I have tried:
<div class="span3 dashboard-blocks">
<h3>Current Employees </h3>
<b style="font-size:16px;">(@Model.EmployeeCount)</b> |
@Html.ActionLink("View", "List", "Employee")<br>
<br>
</br></br></div>
解决方案
Use media queries - CSS | MDN[^].
这篇关于如何根据浏览器大小设置响应跨度宽度的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文