Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
- <script src="button.js"></script>
- <link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">
- <link rel="stylesheet" href="https://code.getmdl.io/1.3.0/material.indigo-pink.min.css">
- <script defer src="https://code.getmdl.io/1.3.0/material.min.js"></script>
- </head>
- <body>
- <script>
- /* Style The Dropdown Button */
- body {
- position: relative;
- }
- .dropbtn {
- background-color: #4CAF50;
- color: white;
- padding: 16px;
- font-size: 16px;
- border: none;
- cursor: pointer;
- }
- /* The container <div> - needed to position the dropdown content */
- .dropdown {
- position: relative;
- display: inline-block;
- z-index: 0;
- }
- /* Dropdown Content (Hidden by Default) */
- .dropdown-content {
- display: none;
- position: absolute;
- background-color: #f9f9f9;
- min-width: 160px;
- box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
- z-index: 1;
- }
- /* Links inside the dropdown */
- .dropdown-content a {
- color: black;
- padding: 12px 16px;
- text-decoration: none;
- display: block;
- }
- /* Change color of dropdown links on hover */
- .dropdown-content a:hover {
- background-color: #f1f1f1
- }
- /* Show the dropdown menu on hover */
- .dropdown:hover .dropdown-content {
- display: block;
- }
- /* Change the background color of the dropdown button when the dropdown content is shown */
- .dropdown:hover .dropbtn {
- background-color: #3e8e41;
- }
- .demo-card-wide.mdl-card {
- width: 512px;
- display: none;
- position: absolute;
- top: 50%;
- left: 50%;
- transform: translate(-50%, -50%);
- }
- .demo-card-wide>.mdl-card__title {
- color: #fff;
- height: 176px;
- background: url('https://www.tes.com/sites/default/files/maths_blackboard.jpg') center / cover;
- }
- .demo-card-wide>.mdl-card__menu {
- color: #fff;
- }
- .background-mask {
- display: none;
- position: absolute;
- width: 100vw;
- height: 100vh;
- top: 0;
- left: 0;
- background-color: rgba(0, 0, 0, 0.7);
- }
- <div class="dropdown">
- <button class="dropbtn">Compulsary</button>
- </script>
- <div class="dropdown-content">
- <a href="#" data-content="English Language Content">English Language</a>
- <a href="#" data-content="English Literature Content">English Literature</a>
- <a href="#" data-content="Mathematics Content">Mathematics</a>
- </div>
- </div>
- <div class="background-mask"></div>
- <div class="demo-card-wide mdl-card mdl-shadow--2dp">
- <div class="mdl-card__title">
- <h2 class="mdl-card__title-text">Mathematics</h2>
- </div>
- <div class="mdl-card__supporting-text">
- This is one of the compulsary subjects and is crucial. It involves geometry, algebra, data, and numbers.
- </div>
- <div class="mdl-card__actions mdl-card--border">
- <a class="mdl-button mdl-button--colored mdl-js-button mdl-js-ripple-effect">
- Done
- </a>
- </div>
- </div>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement