Css Course

Heart shape created with a DIV tag and CSS properties (without image file).
Code:
<style type="text/css">
#heartsp {
 position: relative;
 width: 100px;
 height: 90px;
}
#heartsp:before, #heartsp:after {
 position: absolute;
 content: "";
 left: 50px;
 top: 0;
 width: 50px;
 height: 80px;
 background: red;
 -moz-border-radius: 50px 50px 0 0;
 border-radius: 50px 50px 0 0;
 -webkit-transform: rotate(-45deg);
 -moz-transform: rotate(-45deg);
 -ms-transform: rotate(-45deg);
 -o-transform: rotate(-45deg);
 transform: rotate(-45deg);
 -webkit-transform-origin: 0 100%;
 -moz-transform-origin: 0 100%;
 -ms-transform-origin: 0 100%;
 -o-transform-origin: 0 100%;
 transform-origin: 0 100%;
}
#heartsp:after {
 left: 0;
 -webkit-transform: rotate(45deg);
 -moz-transform: rotate(45deg);
 -ms-transform: rotate(45deg);
 -o-transform: rotate(45deg);
 transform: rotate(45deg);
 -webkit-transform-origin: 100% 100%;
 -moz-transform-origin: 100% 100%;
 -ms-transform-origin: 100% 100%;
 -o-transform-origin: 100% 100%;
 transform-origin :100% 100%;
}
</style>

<div id="heartsp"></div>
Demo:
 

Daily Test with Code Example

HTML
CSS
JavaScript
PHP-MySQL
Which tag can be used to create input text field in web page?
<form> <input> <div>
<input type="text" name="a_name" value="val" />
Which CSS property displays the text in a small-caps font?
display font-variant font-style
h3 {
  font-variant: small-caps;
}
What instruction displays a notice box with a message inside it, in JavaScript?
for() Date() alert()
var msg = "Visit CoursesWeb.net";
alert(msg);
Indicate the PHP code used to get the users IP.
$_SERVER["HTTP_USER_AGENT"] $_SERVER["REMOTE_ADDR"] $_GET[]
$ip = $_SERVER["REMOTE_ADDR"];
echo $ip;
Heart shape with CSS

Last accessed pages

  1. PHP Script Website Mini-Traffic (7264)
  2. Select in MySQL, Output results in HTML Table (19520)
  3. HTML5 Quick Tutorial (5022)
  4. Courses Web: PHP-MySQL JavaScript Node.js Ajax HTML CSS (142736)
  5. jQuery Drag and Drop Rows between two similar Tables (12981)

Popular pages this month

  1. Courses Web: PHP-MySQL JavaScript Node.js Ajax HTML CSS (739)
  2. The Mastery of Love (87)
  3. CSS cursor property - Custom Cursors (84)
  4. Read Excel file data in PHP - PhpExcelReader (73)
  5. PHP-MySQL free course, online tutorials PHP MySQL code (53)