Get the App
SLTechnology News&Howtos  ›  Development  › 

How to display pictures in full screen on Mini Program

Shulou Source: shulou.com Published: 2022-06-01 05:45:53 10月03日 Update

This article mainly introduces "how to achieve full-screen display of pictures on Mini Program". In daily operation, I believe many people have doubts about how to achieve full-screen display of pictures on Mini Program. The editor consulted all kinds of materials and sorted out simple and easy-to-use methods of operation. I hope it will be helpful to answer the doubts of "how Mini Program can achieve full-screen display of pictures". Next, please follow the editor to study!

Set body and html to 100% so that we can use height:100% in their child elements to make our container elements fill the height of the screen.

But in WeChat Mini Programs, there is no dom object, the root node is page, using page {height:100%}

Sure enough, it is feasible. The height occupies the whole window of Mini Program.

Code:

.myView {

Width: 100%

Height: 100vh

Background: red

At this point, on the "Mini Program how to achieve full-screen display of pictures" study is over, I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!

Tags: Programs pictures learning elements more height help feasible practical next code containers objects screens articles methods is to make theory knowledge Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno vpn Redmi Huawei NVidia Shulou Technology