ios浏览器 图片size过大(长度6000px) 设置translateZ(0)/translate3d(0,0,0),会模糊

图片尺寸太大

DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <title>Titletitle>
  <style>
    body {
      margin: 0;
    }

    .body {
      position: absolute;
      width: 100vw;
      height: 100vh;
      overflow: hidden;
    }

    img {
      display: block;
      width: 100%;
    }

    .DESCENTE-H5_TEC-Allterrain {
      width: 100%;
      height: calc(6500 / 900 * 100vw);
      background: url("./images/DESCENTE-H5_TEC-Allterrain.png") 0 0 / 100% no-repeat;
      transform: translate3d(0, 0, 0);
    }

    .DESCENTE-H5_TEC-Allterrain_01 {
      width: 100%;
      /*height: 3250px;*/
      height: calc(3250 / 900 * 100vw);
      background: url("./images/DESCENTE-H5_TEC-Allterrain_01.jpg") 0 0 /100% no-repeat;

    }

    .DESCENTE-H5_TEC-Allterrain_02 {
      width: 100%;
      height: calc(3250 / 900 * 100vw);
      background: url("./images/DESCENTE-H5_TEC-Allterrain_02.jpg") 0 0 /100% no-repeat;
    }
  style>
  <script src="scripts/bscroll.min.js">script>
head>
<body>
<div class="body">
  <div class="DESCENTE-H5_TEC-Allterrain">
    
    
  div>
div>
body>
html>

 

 

 

 

ios浏览器 图片size过大(长度6000px) 设置translateZ(0)/translate3d(0,0,0),会模糊_第1张图片

 

 

 

 大图切割成俩张后

DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <title>Titletitle>
  <style>
    body {
      margin: 0;
    }

    .body {
      position: absolute;
      width: 100vw;
      height: 100vh;
      overflow: hidden;
    }

    img {
      display: block;
      width: 100%;
    }

    .DESCENTE-H5_TEC-Allterrain {
      width: 100%;
      height: calc(6500 / 900 * 100vw);
      background: url("./images/DESCENTE-H5_TEC-Allterrain.png") 0 0 / 100% no-repeat;
      transform: translate3d(0, 0, 0);
    }

    .DESCENTE-H5_TEC-Allterrain_01 {
      width: 100%;
      /*height: 3250px;*/
      height: calc(3250 / 900 * 100vw);
      background: url("./images/DESCENTE-H5_TEC-Allterrain_01.jpg") 0 0 /100% no-repeat;

    }

    .DESCENTE-H5_TEC-Allterrain_02 {
      width: 100%;
      height: calc(3250 / 900 * 100vw);
      background: url("./images/DESCENTE-H5_TEC-Allterrain_02.jpg") 0 0 /100% no-repeat;
    }
  style>
  <script src="scripts/bscroll.min.js">script>
head>
<body>
<div class="body">
  <div class="DESCENTE-H5_TEC-Allterrain">
    <div class="DESCENTE-H5_TEC-Allterrain_01">div>
    <div class="DESCENTE-H5_TEC-Allterrain_02">div>
  div>
div>

<script src="https://cdn.staticfile.org/jquery/3.3.1/jquery.min.js">script>
<script>
  $(function () {
    new BScroll('.body')
  })


script>
body>
html>

 

 

ios浏览器 图片size过大(长度6000px) 设置translateZ(0)/translate3d(0,0,0),会模糊_第2张图片

 

转载于:https://www.cnblogs.com/Koming/p/9910870.html

你可能感兴趣的:(ios浏览器 图片size过大(长度6000px) 设置translateZ(0)/translate3d(0,0,0),会模糊)