Type: ad-comm generic ads
Universal advertising
Support layout
- reponsive
- fixed-height
- fixed
Example
banner style
layout="responsive" is the component layout setting,
<mip-ad layout="responsive" width="414" height="80" type="ad-comm" tpl="onlyImg" href="//m.baidu.com/s?word=百度" data-size="1242 180" src="//m.baidu.com/static/search/ala/ad_1.png"> </mip-ad>
No picture style
<mip-ad layout="fixed-height" height="80" type="ad-comm" tpl="noneImg" href="//m.baidu.com/s?word=百度" data-title="广告标题"> </mip-ad>
Single picture style
<mip-ad layout="reponsive" width="414" height="80" type="ad-comm" tpl="oneImg" href="//m.baidu.com/s?word=百度" data-size="1242 180" src="https://ss2.bdstatic.com/70cFvnSh_Q1YnxGkpoWK1HF6hhy/it/u=2357051511,2286288825&fm=11&gp=0.jpg" data-title="广告标题"> </mip-ad>
Multiple picture style
<mip-ad type="ad-comm" tpl="moreImg" href="//m.baidu.com/s?word=百度" data-size="1242 180" src="https://ss2.bdstatic.com/70cFvnSh_Q1YnxGkpoWK1HF6hhy/it/u=4009078664,3186400936&fm=111&gp=0.jpg;https://ss2.bdstatic.com/70cFvnSh_Q1YnxGkpoWK1HF6hhy/it/u=521986262,2379149184&fm=21&gp=0.jpg;https://ss1.bdstatic.com/70cFuXSh_Q1YnxGkpoWK1HF6hhy/it/u=195400779,4163278668&fm=21&gp=0.jpg" data-ads="这里是广告摘要;这里是广告摘要" data-txt="这里是图片标题;这里是图片标题;这里是图片标题啊啊啊" data-title="这里是广告标题这里是广告标题标"> </mip-ad>
Attributes
type
Description: Advertisement type
Required option: Yes
Type: string
Value: ad-comm
Default value: None
tpl
Description: Style
Required option: Yes
Type: String
Values: banner, noneImg, oneImg, moreImg
Default value: None
href
Description: Jump address
Required option: Yes
Type: URL
Default value: None
src
Description: Picture address. In the multi-picture type, the addresses of multiple pictures are separated by half-width semicolons (;)
Required option: No
Type: String
Default value :None
data-size
Description: Image size, used to set the aspect ratio of the image. If there is an image, you need to set it
Required option: No (advertising type When it is a banner, it is required)
Type: two numbers separated by spaces
Default value: None
data-title
Description: Ad title, can be set as ad description
Required options: banner, multiple pictures) No; (no picture, single picture) Yes
Type: string
Default value: None
data-txt
Description : Advertising subtitle, available when multiple images are used
Required options: No
Type: String
Default value: None
data-ads
Description: Advertisement summary, Available when using multiple images
Required option: No
Type: String
Default value: None