在我正在撰写的网站中,页脚采用以下形式:版权所有 © 2019 David Corne。 Git 提交 23f1372a...
。它在一行上看起来不错,但在移动设备上它分成两行,如下所示:
Copyright © 2019 David Corne. Git commit
23f1372a...
看起来不太好。有没有办法让我把它分解成
Copyright © 2019 David Corne.
Git commit 23f1372a...
但只有当它会分成多行时。如果有帮助,请链接到 github https://github.com/davidcorne/RecipeSite
最佳答案
您可以添加 <br class="hideOnMobile">
在“Git 提交”之前并通过 css 中的媒体查询来控制它。像那样:
.hideOnMobile {
display: none;
}
@media screen and (max-width: 767px) {
.hideOnMobile {
display: block;
}
}
关于html - 如果一个段落溢出,我可以把它分成句子吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57923924/