Background-color of ons-page
How do I make an background-color of ons-page?
Change the background-color of ons-page.. What is a background-color of ons-page? How do you make a background-color of ons-page? This script and codes were developed by Keiji Odagawa on 10 September 2022, Saturday.
Background-color of ons-page - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>background-color of ons-page</title> <link rel='stylesheet prefetch' href='https://unpkg.com/onsenui/css/onsenui.css'>
<link rel='stylesheet prefetch' href='https://unpkg.com/onsenui/css/onsen-css-components.css'> <link rel="stylesheet" href="css/style.css">
</head>
<body> <ons-navigator id="navigator" page="page1.html"></ons-navigator>
<ons-template id="page1.html"> <ons-page id="first-page"> <ons-toolbar> <div class="center">Page 1</div> </ons-toolbar> <div class="content1" style="text-align: center"> <p>This is the first page1.</p> <ons-button id="push-button1">Push page</ons-button> </div> </ons-page>
</ons-template>
<ons-template id="page2.html"> <ons-page id="second-page"> <ons-toolbar> <div class="center">Page 2</div> </ons-toolbar> <div class="content" style="text-align: center"> <p>This is the page2.</p> <ons-button id="push-button2">Push page</ons-button> </div> </ons-page>
</ons-template>
<ons-template id="page3.html"> <ons-page id="third-page"> <ons-toolbar> <div class="center">Page 3</div> </ons-toolbar> <div class="content" style="text-align: center"> <p>This is the page3.</p> <ons-button id="pop-button">Pop Page</ons-button> </div> </ons-page>
</ons-template> <script src='https://unpkg.com/onsenui/js/onsenui.js'></script> <script src="js/index.js"></script>
</body>
</html>
Background-color of ons-page - Script Codes CSS Codes
#first-page .navigation-bar { background-color: transparent;
}
#first-page .page__background { background-color: gray;
}
#second-page .page__background { background-color: red;
}
#third-page .page__background { background-color: yellow;
}
Background-color of ons-page - Script Codes JS Codes
// Page init event
document.addEventListener('init', function(event) { var nav = document.querySelector('#navigator'); var page = event.target; if (page.matches('#first-page')) { page.querySelector('#push-button1').onclick = function() { nav.pushPage('page2.html'); }; } if (page.matches('#second-page')) { page.querySelector('#push-button2').onclick = function() { nav.pushPage('page3.html'); }; } if (page.matches('#third-page')) { page.querySelector('#pop-button').onclick = function() { var page2 = document.getElementById("second-page"); nav.pageLoader.unload(page2); nav.popPage(); }; }
});
Developer | Keiji Odagawa |
Username | keiji |
Uploaded | September 10, 2022 |
Rating | 3 |
Size | 2,130 Kb |
Views | 52,624 |
Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!
Name | Size |
Onsen UI | 1,843 Kb |
Ons-lazy-repeat | 1,905 Kb |
Ons-toolbar and ons-bottom-toolbar | 1,931 Kb |
Ng-show | 1,629 Kb |
Ons-page in ons-carousel | 2,329 Kb |
Ons-lazy-repeat | 1,846 Kb |
Ons-tab and ons-navigator | 2,196 Kb |
Ons-splitter-content | 2,138 Kb |
Ons-tabbar with ons-sliding-menu | 1,850 Kb |
Ons-list with ons-ons-carousel | 2,245 Kb |
Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!
Name | Username | Size |
A Pen by Shidhin | Shidhincr | 5,015 Kb |
Weird glowy CSS3 game | Toneworm | 3,684 Kb |
Barber Shop | Bhlaird | 6,270 Kb |
Minimal Material Design Form Input | Koenigsegg1 | 3,076 Kb |
CSS3 Media Queries demo | Machal | 1,824 Kb |
STIKHOI | Denmch | 7,122 Kb |
Coburg Banks SVG Logo | Mjtweaver | 3,875 Kb |
Loader | MikitaLisavets | 3,321 Kb |
Svg penguin | _massimo | 2,990 Kb |
Draggables in pure angular | Rlo206 | 5,167 Kb |
Surf anonymously, prevent hackers from acquiring your IP address, send anonymous email, and encrypt your Internet connection. High speed, ultra secure, and easy to use. Instant setup. Hide Your IP Now!