Home > Web Front-end > H5 Tutorial > body text

What should I do if the IOS page border cannot be displayed? border-image example tutorial

零下一度
Release: 2017-05-12 12:02:50
Original
2462 people have browsed it

Last Friday, I suddenly received a request from the site to create a mobile model worker display page. The on-site artist sent the prototype drawings. It looks like this:

[移动端] IOS下border-image不起作用的解决办法0
#To be honest, I really want to complain about our artist’s aesthetics, but that’s not the point.

Because the border requires a special pattern, I plan to use border-image to implement it.

  .example{
    ……

    border:6px solid transparent;
    -webkit-border-image:url(../img/border_img.jpg) 6 6 round;
    border-image:url(../img/border_img.jpg) 6 6 round;
    ……
  }
Copy after login

Finally found that the Android display was normal. IOS borders are not displayed.

The solution is:
Replace border:6px solid transparent; with separate attributes, namely: border-style and border-width.

  .example{
    ……
    border-style: solid;
    border-width: 6px;
    -webkit-border-image:url(../img/border_img.jpg) 6 6 round;
    border-image:url(../img/border_img.jpg) 6 6 round;
    ……
  }
Copy after login

Hope it helps everyone.

【Related recommendations】

1. Free h5 online video tutorial

2. HTML5 full version manual

3. php.cn original html5 video tutorial

The above is the detailed content of What should I do if the IOS page border cannot be displayed? border-image example tutorial. 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!