Problems with the use of MUI carousel components

Problems with the use of MUI slide (carousel component)

 

1) Basic use

After dynamically generating the complete DOM (including all DOM structures under mui-slider), manually call the initialization method of the image carousel ; the code is as follows:

var gallery = mui ('. mui-slider');

gallery.slider({

  interval: 5000//Auto rotation cycle, if it is 0, it will not play automatically, the default is 0;

});

 

allery.slider().gotoItem(index);//Jump to the index picture, index starts from 0;

 

2) When there is both a picture carousel component and a slide (carousel component) in a screen on the mobile APP, some mobile phones will have display problems.

 

Existing problem phenomenon: using style z-index="-1" (or other negative values) in the picture carousel, and calling the slider() method in js will cause the carousel components not to be displayed on the screen.

Solution: Do not use the style z-index in the image rotation, you can modify the style of other components, and this can be solved.

Analysis of the reason: The reason is not yet known, it may be a bug in the MUI.

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326241435&siteId=291194637