Sunday, April 19, 2020

Modal in HTML and CSS

This program is being written by my good friend and fellow software engineer Sir Ernel G. Fadriquilan thank you very much, Sir, for sharing your code to us.

I am currently accepting programming work inventory system, enrollment system, accounting system, payroll system, information system, website design and development using WordPress, IT projects, school and application development, programming projects, thesis, and capstone projects, IT consulting work, computer tutorials, and web development work kindly contact me in the following email address for further details. If you want to advertise on my website kindly contact me also in my email address also. Thank you.

My email address is the following jakerpomperada@gmail.com, jakerpomperada@aol.com, and jakerpomperada@yahoo.com.

My mobile number here in the Philippines is 09173084360.

My telephone number at home here in Bacolod City, Negros Occidental Philippines is +63 (034) 4335675.

Here in Bacolod City, Negros Occidental I also accepting computer repair, web development using WordPress, Computer Networking and Arduino Project development at a very affordable price.

My personal website is http://www.jakerpomperada.com

My programming website is http://www.jakerpomperada.blogspot.com

I am also a book author you can purchase my books on computer programming and information technology in the following links below.

https://www.mindshaperspublishing.com/

https://www.unlimitedbooksph.com/

Program Listing

<!DOCTYPE html> 
<html> 
<head> 
<meta name="viewport" content="width=device-width, initial-scale=1"> 
<style> 
@-webkit-keyframes example { 
from { 
top: -100px; 
opacity: 0; 

to { 
top: 0px; 
opacity: 1; 


/* Add animation (Standard syntax) */ 
@keyframes example { 
from { 
top: -100px; 
opacity: 0; 

to { 
top: 0px; 
opacity: 1; 


/* The modal's background */ 
.modal { 
display: none; 
position: fixed; 
left: 0; 
top: 0; 
width: 100%; 
height: 100%; 
overflow: auto; 
background-color: rgb(0, 0, 0); 
background-color: rgba(0, 0, 0, 0.4); 

/* Display the modal when targeted */ 
.modal:target { 
display: table; 
position: absolute; 

/* The modal box */ 
.modal-dialog { 
display: table-cell; 
vertical-align: middle; 

/* The modal's content */ 
.modal-dialog .modal-content { 
margin: auto; 
background-color: #f3f3f3; 
position: relative; 
padding: 0; 
outline: 0; 
border: 1px #777 solid; 
text-align: justify; 
width: 80%; 
box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19); 
/* Add animation */ 
-webkit-animation-name: example; 
/* Chrome, Safari, Opera */ 
-webkit-animation-duration: 0.5s; 
/* Chrome, Safari, Opera */ 
animation-name: example; 
animation-duration: 0.5s; 

/* The button used to close the modal */ 
.closebtn { 
text-decoration: none; 
float: right; 
font-size: 50px; 
font-weight: bold; 
color: #fff; 

.closebtn:hover, 
.closebtn:focus { 
color: #000; 
text-decoration: none; 
cursor: pointer; 

.container { 
padding: 2px 16px; 

header { 
background-color: #5cb85c; 
font-size: 25px; 
color: white; 

footer { 
background-color: #5cb85c; 
font-size: 20px; 
color: white; 

</style> 
</head> 
<body contenteditable="false"> 
<a href="#id01">Open Modal</a> 
<div id="id01" class="modal"> 
<div class="modal-dialog"> 
<div class="modal-content"> 
<header class="container"> 
<a href="#" class="closebtn">x</a> 
<h2>Modal Header</h2> 
</header> 
<div class="container"> 
<p>Some text in the modal.</p> 
<p>Some text in the modal.</p> 
</div> 
<footer class="container"> 
<p>Modal footer</p> 
</footer> 
</div> 
</div> 
</div> 
</body> 

</html>

No comments:

Post a Comment