Home > Article > Daily Programming > How to use MIP components
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.
902f1c57866cca807a43e508695816e8 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 6c04bd5ca3fcae76e30b72ad730ca86d :
<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>
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!