I want to ion header or nav transparent, so I can something like shown on the picture. But setting the background-color to transparent does not solve the problem. The content should be "fullscreen" than. If possible, the content should be behind the status bar.
To have a transparent header or footer you have to override the class "scroll content" in the ion-content and set the margin-top or margin-bottom to 0. Show activity on this post. The other answers work but as you said the content is no longer scrollable. The "transparent" tag should do the trick.
The toolbar is a generic bar which is used in an app as a header, sub-header, footer, or sub-footer. It is positioned above or below the content. You can add more than one toolbar in your page, and the <ion-content> will adjust it accordingly.
So there are a few things you need to do. First, as Dennis said, I wrote a little tutorial for setting the headers as transparent, which you could check in detail here.
transparent
input property to your nav-bar
, which basically adds background:transparent !important
to the toolbar.no-border
to your ion-header
..scroll-content
, so the header padding is ignored. To do so, just add top-padding: 0
..slide-zoom
, which is generated automatically by ion-slide
. You can set its height as 100% as well as width then add something like background: linear-gradient(0deg, rgba(226, 135, 106, 0.84) 0%, rgba(255, 93, 152, 0.85) 100%) !important;
.swiper-pagination-bullet
and .swiper-pagination-bullet-active
.I wrote a really quick example trying to achieve what you wish:
If this is what you wish, I published a repo so you can use it as reference.
I have found a really nice solution: Tutorial
<ion-header no-border>
(delete the border on android devices)<ion-navbar transparent>
This is what you're looking for:
By default, content is positioned between the headers and footers. However, using
fullscreen="true"
, the content will be able to scroll "under" the headers and footers. At first glance the fullscreen option may not look any different than the default, however, by adding a transparency effect to a header then the content can be seen under the header as the user scrolls.
So you just need to add fullscreen="true"
in your content like this
<ion-content fullscreen="true">
<!-- ... -->
</ion-content>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With