Skip to content

Instantly share code, notes, and snippets.

#main { width: 950px; margin: 0 atuo; }#main p { margin: 0 0 1em; }#main p span { color: red; }
#main { width: 950px; margin: 0 atuo; }
#main p { margin: 0 0 1em; }
#main p span { color: red; }
footer { height: 300px; }
footer p { font-size: 12px; }
#main {
width: 950px;
margin: 0 atuo; }
#main p {
margin: 0 0 1em; }
#main p span {
color: red; }
#main {
width: 950px;
margin: 0 atuo;
}
#main p {
margin: 0 0 1em;
}
#main p span {
color: red;
}
#lean_overlay {
position: fixed; z-index:100;
top: 0px;
left: 0px;
height: 100%;
width: 100%;
background: #000;
display: none;
}
<!DOCTYPE html>
<html lang="ja">
<head>
<meta charset="UTF-8">
<title>smoothScroll</title>
<!-- javascripts -->
<script src="js/jquery-1.10.2.min.js"></script>
<script type="text/javascript" src="js/jquery.leanModal.min.js"></script>
<!-- ※javascriptをhtml内に直接書く場合は必要ない -->
<script type="text/javascript" src="js/leanModal-sample.js"></script>
$(function() {
$( 'a[rel*=leanModal]').leanModal({
top: 50, // #modal-windowの縦位置
overlay : 0.7, // #modal-windowの背面の透明度
closeButton: ".modal_close" // #modal-windowを閉じるボタンのdivのclass
});
});
/* 計算しやすいようにroot要素に10px相当のサイズを指定するのが一般的 */
html {
font-size: 62.5%;
}
/* 「rem」未対応ブラウザ用に、最初に「px」で定義し、その後に「rem」で定義する。 */
body {
font-size: 10px;
font-size: 1.0rem;
}
p {
<!DOCTYPE html>
<html lang="ja">
<head>
<meta charset="UTF-8">
<title>REM unit polyfillの使い方</title>
<script type="text/javascript src="js/rem.js"></script>
</head>
<body>
</body>
</html>
<!DOCTYPE html>
<html lang="ja">
<head>
<meta charset="UTF-8">
<title></title>
</head>
<body>
</body>
</html>