In order to change the status bar at the top of the screen (which usually displays the time and battery status) of your progressive web app, you must use the configure few properties for your app to provide complete native look and feel.
Chrome, Firefox and Opera allow you to define color of the status bar using the meta tags.
<!-- Chrome, Firefox OS and Opera -->
<meta name="theme-color" content="#014473">
Example:
Unfortunately, the number of ways to customize the status bar for iOS devices are fairly limited, but Apple offers the apple-mobile-web-app-status-bar-style
meta tag to customize status bar. There are three distinct settings available: default
, black
, and black-translucent
. The default value is default
.
This meta tag has no effect unless you add apple-apple-mobile-web-app-capable
meta tag.
<meta name="apple-mobile-web-app-capable" content="yes">
The default setting has a white background with black text and symbols.
<meta name="apple-mobile-web-app-status-bar-style" content="default">
Example:
The black setting has a black background and black text and symbols, making it appear completely black.
<meta name="apple-mobile-web-app-status-bar-style" content="black">
Example:
The black-translucent setting has white text and symbols, and will take the same background color as the body of your web app.
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
body {
background-color: #014473;
}
Example:
is there a way to do it using just css because i am making a custom css theme on revolt mobile web app and i am trying to make the status bar transparent so i can have a background wallpaper image go through the status bar without having to make a gradient to the background color