Kursus Membuat Web

iklan

Membuat Block Quote CSS 2

Block Quote ini dibuat menggunakan HTML 5 dan CSS 3

Gambar Block Quote
membuat menu css
Lihat Demo ..

Source Code HTML

Buat kode HTML 5 sebagai berikut

Source Code HTML
<!DOCTYPE html>
<html lang="id">
	<head>
		<title>Membuat Block Quote CSS - Kursus Membuat Web</title>
		<meta charset="utf-8">
		<link rel="stylesheet" type="text/css" href="normalize.css" media="all">
		<link rel="stylesheet" type="text/css" href="style_common.css" media="all">
		<link rel="stylesheet" type="text/css" href="block_quote.css" media="all">
	</head>
	<body>
		<div class="mb-wrap mb-style-3">
			<blockquote cite="#">
				<p>Barang siapa tidak mau merasakan pahitnya belajar, maka dia akan merasakan hinanya kebodohan seumur hidupnya.</p>
			</blockquote>
			<div class="mb-attribution">
				<p class="mb-author">Imam Syafii</p>
				<cite><a href="#">Imam Syafii</a></cite>
				<div class="mb-thumb"></div>
			</div>
		</div>
	</body>
</html>

Source Code CSS

Selanjutnya buat kode CSS 3 sebagai berikut

style_common.css
@font-face {
  font-family: 'icons';
  src: url("font/icons.eot");
  src: 
  url("font/icons.eot?#iefix") format('embedded-opentype'), 
  url("font/icons.woff") format('woff'), 
  url("font/icons.ttf") format('truetype'), 
  url("font/icons.svg#icons") format('svg');
  font-weight: normal;
  font-style: normal;
}
/* Let's set and reset some common styles */
  .mb-wrap {
  width: 300px;
  margin: 20px auto;
  padding: 20px;
  position: relative; 
}
.mb-wrap p{
  margin: 0;
  padding: 0;
}
.mb-wrap blockquote {
  margin: 0;
  padding: 0;
  position: relative;
}
.mb-wrap cite {
  font-style: normal;
}
block_quote.css
body {
  background: #ddd url(strange_bullseyes.jpg) repeat top left;
}
.mb-style-3 {
  width: 500px;
}
.mb-style-3 blockquote{
  background: #fff;
  padding: 30px;
  border-radius: 5px;
  box-shadow: 
  inset 0 2px 0 rgba(188, 147, 200, 0.7), 
  -5px -4px 25px rgba(0, 0, 0, 0.3);
}
.mb-style-3 blockquote:after, 
  .mb-style-3 blockquote:before  {
  top: 100%;
  border: solid transparent;
  content: " ";
  height: 0;
  width: 0;
  position: absolute;
  pointer-events: none;
}
.mb-style-3 blockquote:after  {
  border-top-color: #ffffff;
  border-width: 10px;
  left: 65%;
  margin-left: -10px;
}
.mb-style-3 blockquote:before {
  border-top-color: rgba(0,0,0,0.01);
  border-width: 11px;
  left: 65%;
  margin-left: -11px;
}
.mb-style-3 blockquote p {
  font-family: 'Alegreya', serif;
  font-size: 24px;
  color: #b4b4b4;
  font-weight: 400;
  line-height: 40px;
  font-style: italic;
  text-indent: 100px;
  position: relative;
}
.mb-style-3 blockquote p:before{
  content: '\201C';
  font-family: serif;
  font-style: normal;
  font-weight: 700;
  position: absolute;
  font-size: 175px;
  top: 0px;
  left: -105px;
  color: rgba(188, 147, 200, 1);
  text-shadow: 7px 14px 10px rgba(0, 0, 0, 0.1);
}
.mb-style-3 .mb-attribution {
  text-align: right;
  padding: 20px 100px 20px 20px;
  position: relative;
}
.mb-style-3 .mb-thumb {
  display: block;
  width: 70px;
  height: 70px;
  border: 5px solid #fff;
  border-radius: 50%;
  background: url(imam-syafii.jpg) no-repeat center center;
  position: absolute;
  right: 10px;
  bottom: 5px;
  box-shadow: 
  inset 1px 1px 4px rgba(0,0,0,0.5),
  0 2px 3px rgba(0,0,0,0.6);
}
.mb-style-3 .mb-author{
  font-family: 'Alegreya SC', serif;
  font-weight: 700;
  font-size: 18px;
  color: rgba(188, 147, 200, 1);
  text-shadow: 0 1px 1px rgba(255,255,255,0.7);
}
.mb-style-3 cite a{
  font-family: 'Alegreya', serif;
  font-weight: 700;
  font-style: italic;
  color: #fff;
  text-shadow: 0 1px 1px rgba(0,0,0,0.3);
}
.mb-style-3 cite a:hover{
  color: rgba(188, 147, 200, 1);
  text-shadow: 0 1px 1px rgba(255,255,255,0.7);
}
Lihat Demo ..

muhammad falah

Saya Muhammad Falah, jika Anda ingin langsung belajar dengan Saya, silakan ikuti kursus membuat web yang Saya bimbing atau ikuti Saya di :

Muhammad Falah Youtube Channel Muhammad Falah LinkedIn Muhammad Falah Google Plus Muhammad Falah Twitter Muhammad Falah Facebook

copy right © 2015