MediaWiki:Mobile.css
注意:在发布之后,您可能需要清除浏览器缓存才能看到所作出的变更的影响。
- Firefox或Safari:按住Shift的同时单击刷新,或按Ctrl-F5或Ctrl-R(Mac为⌘-R)
- Google Chrome:按Ctrl-Shift-R(Mac为⌘-Shift-R)
- Internet Explorer或Edge:按住Ctrl的同时单击刷新,或按Ctrl-F5
- Opera:按 Ctrl-F5。
/* 网站公告的 CSS - 移动端和桌面端通用 */
#siteNoticeScroll {
width: 100%;
height: 25px;
line-height: 25px;
overflow: hidden;
text-align: center;
margin-bottom: 0.25em;
position: relative;
}
#siteNoticeScroll ul {
height: 25px;
line-height: 25px;
margin: 0 !important;
padding: 0 !important;
list-style: none !important;
-webkit-transition: margin-left 0.73s ease-in-out !important;
-moz-transition: margin-left 0.73s ease-in-out !important;
-o-transition: margin-left 0.73s ease-in-out !important;
transition: margin-left 0.73s ease-in-out !important;
display: block !important;
white-space: nowrap !important;
position: relative !important;
will-change: margin-left;
}
#siteNoticeScroll li {
height: 25px;
line-height: 25px;
list-style: none !important;
float: left !important;
width: 100% !important;
display: inline-block !important;
box-sizing: border-box !important;
padding: 0 10px;
vertical-align: top;
flex-shrink: 0;
}
/* 移动端优化 */
@media screen and (max-width: 720px) {
#siteNoticeScroll {
height: auto;
min-height: 25px;
}
#siteNoticeScroll ul {
height: auto;
min-height: 25px;
}
#siteNoticeScroll li {
height: auto;
min-height: 25px;
line-height: 1.5;
padding: 2px 10px;
}
}
/* 确保在移动端也能正常显示 */
.mw-mf-viewport #siteNoticeScroll {
width: 100%;
overflow: hidden;
}