移动端闪存
All checks were successful
Gitea Actions Official-website / deploy-dev (push) Successful in 4s
All checks were successful
Gitea Actions Official-website / deploy-dev (push) Successful in 4s
This commit is contained in:
@@ -0,0 +1,61 @@
|
||||
<link rel="stylesheet" href="__CSS__/topic_laptop/header.css">
|
||||
<link rel="stylesheet" href="__CSS__/topic_ssd/index.css">
|
||||
<link rel="stylesheet" href="__CSS__/topic_laptop/footer.css">
|
||||
<!-- 将rem适配JS移到这里,确保优先执行 -->
|
||||
<script type="text/javascript">
|
||||
(function (doc, win)
|
||||
{
|
||||
var docEl = doc.documentElement;
|
||||
var resizeEvt = 'orientationchange' in window ? 'orientationchange' : 'resize';
|
||||
|
||||
function setRootFontSize ()
|
||||
{
|
||||
var clientWidth = docEl.clientWidth;
|
||||
if (!clientWidth) return;
|
||||
var fontSize = clientWidth / 7.5;
|
||||
// 直接修改内联样式,优先级最高
|
||||
docEl.setAttribute('style', 'font-size: ' + fontSize + 'px !important;');
|
||||
}
|
||||
|
||||
setRootFontSize();
|
||||
win.addEventListener(resizeEvt, setRootFontSize);
|
||||
doc.addEventListener('DOMContentLoaded', setRootFontSize);
|
||||
})(document, window);
|
||||
</script>
|
||||
|
||||
<body>
|
||||
<div class="m-sc-main">
|
||||
<a href="#" target="_blank">
|
||||
<img src="./mimg/m-sc-img-1.png" alt="" class="m-sc-main-img">
|
||||
</a>
|
||||
<a href="#" target="_blank" class="m-sc-mt20">
|
||||
<img src="./mimg/m-sc-img-2.png" alt="" class="m-sc-main-img">
|
||||
</a>
|
||||
<a href="#" target="_blank" class="m-sc-mt20">
|
||||
<img src="./mimg/m-sc-img-3.png" alt="" class="m-sc-main-img">
|
||||
</a>
|
||||
<a href="#" target="_blank" class="m-sc-mt20">
|
||||
<img src="./mimg/m-sc-img-4.png" alt="" class="m-sc-main-img">
|
||||
</a>
|
||||
<a href="#" target="_blank" class="m-sc-mt20">
|
||||
<img src="./mimg/m-sc-img-5.png" alt="" class="m-sc-main-img">
|
||||
</a>
|
||||
<div class="m-sc-main-imgs m-sc-mt20">
|
||||
<a href="#" target="_blank" class="">
|
||||
<img src="./mimg/m-sc-imgs-1.png" alt="" class="m-sc-main-img1">
|
||||
</a>
|
||||
<a href="#" target="_blank" class="">
|
||||
<img src="./mimg/m-sc-imgs-2.png" alt="" class="m-sc-main-img1">
|
||||
</a>
|
||||
<a href="#" target="_blank" class="">
|
||||
<img src="./mimg/m-sc-imgs-3.png" alt="" class="m-sc-main-img1">
|
||||
</a>
|
||||
<a href="#" target="_blank" class="">
|
||||
<img src="./mimg/m-sc-imgs-4.png" alt="" class="m-sc-main-img1">
|
||||
</a>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -29,7 +29,7 @@
|
||||
{block name="main"}
|
||||
<div class="sc-main">
|
||||
{volist name="data.top_focus_images" id="item"}
|
||||
<a href="{$item.link}" target="_blank">
|
||||
<a href="{$item.link}" target="_blank" class="sc-mt20">
|
||||
<img src="{$item.image}" alt="" class="sc-main-img">
|
||||
</a>
|
||||
{/volist}
|
||||
|
||||
60
public/static/index/mobile/css/topic_ssd/index.css
Normal file
60
public/static/index/mobile/css/topic_ssd/index.css
Normal file
@@ -0,0 +1,60 @@
|
||||
* {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
html {
|
||||
width: 100% !important;
|
||||
overflow-x: hidden;
|
||||
margin: 0 !important;
|
||||
padding: 0 !important;
|
||||
max-width: 100vw !important;
|
||||
}
|
||||
body {
|
||||
width: 100%;
|
||||
background: #fff;
|
||||
overflow-x: hidden;
|
||||
margin: 0 !important;
|
||||
padding: 0 !important;
|
||||
max-width: 100vw !important;
|
||||
}
|
||||
.m-sc-main {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
a {
|
||||
text-decoration: none;
|
||||
display: block;
|
||||
}
|
||||
|
||||
img {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.m-sc-main-img {
|
||||
width: 100%;
|
||||
/* max-width: 2560px; */
|
||||
}
|
||||
|
||||
.m-sc-mt20 {
|
||||
margin-top: 0.1rem;
|
||||
}
|
||||
|
||||
.m-sc-main-imgs {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr 1fr;
|
||||
gap: 0.1rem;
|
||||
list-style: none;
|
||||
/* 去除列表样式(如果有) */
|
||||
}
|
||||
|
||||
.m-sc-main-imgs a {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.m-sc-main-img1 {
|
||||
width: 100%;
|
||||
height: auto;
|
||||
/* 保持比例 */
|
||||
display: block;
|
||||
}
|
||||
@@ -39,7 +39,9 @@ img {
|
||||
width: 100%;
|
||||
max-width: 2560px;
|
||||
}
|
||||
|
||||
.sc-mt20:first-child {
|
||||
margin-top: 0 !important;
|
||||
}
|
||||
.sc-mt20 {
|
||||
margin-top: 0.2rem;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user