This article mainly introduces you to the important attributes in the MIP carousel component.
MIP, mobile web accelerator. Regarding the introduction of the MIP carousel component, in our previous article, we have introduced the use of the MIP component by giving an example of a carousel component. Then this simple carousel component example is
Recommended reference is the MIP user manual: "MIP Documentation Manual"
Below we will introduce to you the MIP carousel diagram with simple component code examples. important attributes.
<mip-carousel autoplay defer="1000" layout="responsive" width="600" height="400" indicator buttonController > <a target="_blank" href="//m.sbmmt.com"> <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 above component code displays the following effect:
The important attributes that need to be noted here are as follows:
autoplay Attribute: Used to specify whether the carousel image will automatically play. Without this attribute, the carousel image can only be switched by clicking manually.
deferAttribute: Indicates the time interval of each rotation. If autoplay is set, you can add defer to specify the time interval of the rotation.
indicatorIdAttributes: The indicator function field below must be consistent with the id value of the indicator's parent node. The number of indicators and the number of items in the carousel must be consistent. The indicator is strongly dependent on id. The style can be modified by yourself. The example is the official default style, and the indicator can be clicked to position.
width and height attributes: respectively represent the image proportions set in conjunction with the height and width attributes. Not the actual width and height.
indicatorAttribute: Set the number of pages displayed on the carousel, as shown in the number on the lower right in the picture above.
layout Setting the value to responsive means that the image is allowed to adapt.
This article is an introduction to the important attributes in the MIP carousel component. I hope it will be helpful to friends in need!
The above is the detailed content of Explanation of important attributes in Mip carousel component. For more information, please follow other related articles on the PHP Chinese website!