How to use MIP components

藏色散人
Release: 2018-11-02 17:51:51
Original
6514 people have browsed it

This article mainly introduces you to the simple use of MIP components.

MIP is the mobile web accelerator. In the previous article, I have introduced you to the method of creating the initial MIP file and the MIP rules that need to be paid attention to.

Everyone should know that the advantage of MIP is to improve the loading speed of mobile web pages, which is very friendly to mobile users.

So how do we use MIP components?

First of all, everyone needs to know what MIP components include?

1. Built-in components

Built-in components are components included in mip.js and can be used directly without introducing additional JS scripts.

2. Personalized components

Personalized components are components that meet specific needs, including interaction, statistics and other needs. The corresponding JS script needs to be introduced.

3. Advertising component

The advertising component mainly meets the delivery of various types of advertisements and requires the introduction of corresponding JS scripts. Read the advertising documentation to determine the MIP advertising type.

For detailed component content, please refer to the "MIP Documentation Manual" on the PHP Chinese website

Here we mainly introduce to you the built-in components in MIP: mip- Demonstration of using carousel multi-image carousel.

is used to support a display method for images in MIP and supports multi-image carousel.

For example, to use a multi-image carousel with mip-carousel subtitle effect in the initial mip1.html file, just add the following code to

<mip-carousel
    autoplay
    defer="1000"  
    layout="responsive" 
    width="600" 
    height="400"
    indicator
    buttonController
    >
    <a target="_blank" href="http://www.php.cn">
        <mip-img src="你的图片地址" layout="responsive"  width="600" height="400"></mip-img>
        <div class="mip-carousle-subtitle">这里是标题</div>
    </a>
    <mip-img src="你的图片地址"></mip-img>
    <mip-img src="你的图片地址"></mip-img>
</mip-carousel>
Copy after login

The basic component code structure is as shown above. You can modify the parameters in the MIP component according to your own project needs.

This article is a simple introduction to the use of MIP components. It is also very easy to understand. In later articles, I will continue to introduce you to the testing of MIP pages. Interested friends can continue to pay attention to the PHP Chinese website.

The above is the detailed content of How to use MIP components. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!