我想为 320 像素 - 480 像素的移动 View 分辨率添加 br 标签。我试过 margin top , bottom 但没有用。所以请帮助我。
我想在这两个 anchor 标记之间添加 br 标记。下面两个这样的标签。
<a class="ww" href="counseller.html">Career Counsellor</a>
<a class="xx" href="mentors.html"> Career Mentor</a>
最佳答案
你可以使用媒体查询
类(class)mobile
适用于 <br />
.当 width
浏览器小于 320px,将应用媒体查询中的类并显示元素。
.mobile {
display: none;
}
@media (max-width: 320px) {
.mobile {
display: block;
/* Add other properties here */
}
}
<a class="ww" href="counseller.html">Career Counsellor</a>
<br class="mobile" />
<a class="xx" href="mentors.html"> Career Mentor</a>
关于javascript - 在移动设备或特定分辨率下添加 <br> 标签,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32901604/