Copy Web dongxiao failure summary

A recent copy of a Web site (in fact, picking up a station), encountered some problems may be common in this overall summary.

1. Methods: Online says Grilled specialized software site, but to no avail. I go directly to the source code, css, js pictures, so down. Because not many web pages, so one page get down so bad.

2. One problem: a blank page
 will combine the downloaded file, and make sure all the correct combination, but the page did not show.
 In turn commented js file, find the problem is one js file, comment out the pages began to unravel.
 So, picking a file from the Internet is not entirely credible, and this file will generally not read, commented on the commented out.

3. Question two: find the page JS
 as commented out all the js, so pages dynamic efficiency need to re-write.
 Simple can write your own, somewhat complex might not write.
 This situation can find clues from the html file.
 This page has a vertical carousel effect, from the class name found swiper, but also in line with the structure of the basic structure swiper plug-in, then find the corresponding plug-in, you can process a little.
 (Another clue to the plug, there html source style = "height: 600px;" style similar wording, which may be thrust end plug js)
 in the writing plug-in, a picking down to note contains html Some plug-ins are added to run classes, such as active, to be deleted.

4. Question three: swiper highly adaptive plug-
 in after swiper plus, not a total height of the browser window carousel up and down the page. Prepare yourself all the time to re-write js determine the height, and then fortunately no, thanks parameter settings.
 This plug-like swiper more perfect plug-in, a dedicated website detailed analysis, to find the answer from the document from the last.
 https://www.swiper.com.cn/api/parameters/275.html

<Script>
 var mySwiper = new new Swiper ( '.-Swiper Container' , { 
  direction: 'Vertical' , 
  height: 300, // your height slide 
  @ full screen height: window.innerHeight, 
}) 
 </ Script>

 

5. Question 4: adaptive full-screen height
 in the window during the stretching, the width can be adaptive, but the height can not. Since the height get the height itself is determined by the JS window, if the window height changes need to re-confirmation by JS
 JS version 

<Script>
  // first open adaptive 
    var Swiper = new new Swiper ( 'Swiper-Container.' , { 
        the pagination: 'the pagination-.swiper' , 
        direction: 'Vertical' , 
        slidesPerView: . 1 , 
        paginationClickable: to true , 
        mousewheelControl: to true , 
        height : window.innerHeight, 
    }); 


    // window after stretching highly adaptive 
    window.onresize = function () {
         var Swiper = new new Swiper ( 'Swiper-Container.' , { 
          the pagination:'.swiper-pagination',
          direction: 'vertical',
          slidesPerView: 1,
          paginationClickable: true,
          mousewheelControl: true,
          height : window.innerHeight,
      });
    }

</script>

  
JQUERY version resize

$(window).resize(function() {
  $('span').text(x+=1);
});

 

6. Question 5: turn pages by clicking on the other elements of the page
 flip swiper can be achieved by clicking on the page and scroll mouse,
 could not find how the mouse to scroll, click on the page number on the simulated (source file and no page numbers, according to the standard document plus the page)

$('.iconarrow-line-down').click(function(){
      $('.swiper-pagination-bullet').eq(1).click();
    });

 

Guess you like

Origin www.cnblogs.com/catcher625/p/10945365.html