{"id":1584,"date":"2015-02-08T12:44:25","date_gmt":"2015-02-08T03:44:25","guid":{"rendered":"http:\/\/www.dream-net.org\/blog\/?p=1584"},"modified":"2015-02-18T00:38:53","modified_gmt":"2015-02-17T15:38:53","slug":"%e3%80%90css3%e3%80%91scss%e3%81%a7%e4%bd%9c%e3%82%8b%e3%82%b9%e3%83%a9%e3%82%a4%e3%83%89%e3%83%a1%e3%83%8b%e3%83%a5%e3%83%bc%ef%bc%81%e3%83%9e%e3%82%a6%e3%82%b9%e3%82%aa%e3%83%bc%e3%83%90%e3%83%bc","status":"publish","type":"post","link":"https:\/\/dream-net.org\/blog\/?p=1584","title":{"rendered":"\u3010CSS3\u3011SCSS\u3067\u4f5c\u308b\u30b9\u30e9\u30a4\u30c9\u30e1\u30cb\u30e5\u30fc\uff01\u30de\u30a6\u30b9\u30aa\u30fc\u30d0\u30fc\u3067\u80cc\u666f\u8272\u30c1\u30a7\u30f3\u30b8"},"content":{"rendered":"<div id=\"toc_container\" class=\"no_bullets\"><p class=\"toc_title\">Contents<\/p><ul class=\"toc_list\"><ul><li><a href=\"#CSS3CSS\"><span class=\"toc_number toc_depth_2\">0.1<\/span> \u3010CSS3\u3011CSS\u3060\u3051\u3067\u5b9f\u73fe\uff01\u80cc\u666f\u753b\u50cf\u3092\u56fa\u5b9a\uff06\u30b9\u30af\u30ed\u30fc\u30eb\u3067\u5207\u308a\u66ff\u3048\u308b\u30d1\u30e9\u30e9\u30c3\u30af\u30b9\u98a8\u52b9\u679c<\/a><\/li><li><a href=\"#i\"><span class=\"toc_number toc_depth_2\">0.2<\/span> \u25a0\u4f7f\u3044\u65b9<\/a><\/li><\/ul><\/li><li><a href=\"#i-2\"><span class=\"toc_number toc_depth_1\">1<\/span> \u30bf\u30a4\u30c8\u30eb<\/a><ul><li><a href=\"#i-3\"><span class=\"toc_number toc_depth_2\">1.1<\/span> \u30bf\u30a4\u30c8\u30eb<\/a><\/li><li><a href=\"#i-4\"><span class=\"toc_number toc_depth_2\">1.2<\/span> \u25a0\u30bf\u30a4\u30c8\u30eb\u3092\u4e0a\u4e0b\u5de6\u53f3\u4e2d\u592e\u306b\u914d\u7f6e\u3057\u305f\u3044\u5834\u5408<\/a><\/li><\/ul><\/li><\/ul><\/div>\n<h2 style=\"color: #0083b9; background: #fffd73;\"><span id=\"CSS3CSS\">\u3010CSS3\u3011CSS\u3060\u3051\u3067\u5b9f\u73fe\uff01\u80cc\u666f\u753b\u50cf\u3092\u56fa\u5b9a\uff06\u30b9\u30af\u30ed\u30fc\u30eb\u3067\u5207\u308a\u66ff\u3048\u308b\u30d1\u30e9\u30e9\u30c3\u30af\u30b9\u98a8\u52b9\u679c<\/span><\/h2>\n<p>\u80cc\u666f\u753b\u50cf\u3092\u753b\u9762\u3044\u3063\u3071\u3044\u306b\u8868\u793a\u3057\u3001\u30d1\u30e9\u30e9\u30c3\u30af\u30b9\u52b9\u679c\u306e\u3088\u3046\u306b\u30b9\u30af\u30ed\u30fc\u30eb\u3067\u753b\u50cf\u3092\u5207\u308a\u66ff\u3048\u308bCSS\u3092\u3054\u7d39\u4ecb\u3057\u307e\u3059\u3002\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u4f7f\u7528\u3057\u3066\u3044\u306a\u3044\u306e\u3067\u52d5\u4f5c\u304c\u8efd\u304f\u3001\u5b9f\u88c5\u3082\u30b7\u30f3\u30d7\u30eb\u3067\u7c21\u5358\u3067\u3059\u3002<br \/>\n\u307e\u305a\u306f\u3001\u30c7\u30e2\u3092\u3054\u89a7\u4e0b\u3055\u3044\u3002<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/www.dream-net.org\/blog\/wp-content\/uploads\/2015\/02\/014.jpg\" alt=\"CODYHOUSE\" \/><\/p>\n<p><a href=\"http:\/\/codyhouse.co\/demo\/alternate-fixed-scroll-background\/index.html\" target=\"_blank\">http:\/\/codyhouse.co\/demo\/alternate-fixed-scroll-background\/index.html<\/a><\/p>\n<p>\u89e3\u8aac\u30da\u30fc\u30b8\u306f\u3053\u3061\u3089\u3002<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/www.dream-net.org\/blog\/wp-content\/uploads\/2015\/02\/023.jpg\" alt=\"ALTERNATE FIXED\" \/><\/p>\n<h2 style=\"color: #0083b9;\"><span id=\"i\">\u25a0\u4f7f\u3044\u65b9<\/span><\/h2>\n<p>\u80cc\u666f\u753b\u50cf\u306e\u3042\u308b\u30b3\u30f3\u30c6\u30f3\u30c4\u3068\u3001\u305d\u308c\u306b\u7d9a\u304f\u80cc\u666f\u753b\u50cf\u306e\u306a\u3044\u30b3\u30f3\u30c6\u30f3\u30c4\u3092\u4e00\u3064\u306e\u30b0\u30eb\u30fc\u30d7\u3068\u3057\u3066[div]\u30bf\u30b0\u3067\u56f2\u307f\u307e\u3059\u3002<br \/>\n\u30b3\u30f3\u30c6\u30f3\u30c4\u3092\u4e0b\u306b\u5897\u3084\u3057\u3066\u3044\u304f\u306b\u306f\u3001\u30b0\u30eb\u30fc\u30d7\u90e8\u5206\u3092\u7e70\u308a\u8fd4\u3057\u307e\u3059\u3002<br \/>\ncd-bg-1\u3068\u3044\u3046\u30af\u30e9\u30b9\u306f\u3001cd-bg-2\u3001cd-bg-3\u3068\u5897\u3084\u3057\u3066\u3044\u304d\u3001\u305d\u308c\u305e\u308cCSS\u3067\u80cc\u666f\u753b\u50cf\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002<\/p>\n<p>[HTML]<\/p>\n<pre>\r\n<xmp>\r\n<!--\u30b0\u30eb\u30fc\u30d7\uff11-->\r\n<div class=\"cd-fixed-bg cd-bg-1\">         \r\n<h1><span id=\"i-2\">\u30bf\u30a4\u30c8\u30eb<\/span><\/h1>     \r\n<\/div>       \r\n<div class=\"cd-scrolling-bg\">         \r\n<div class=\"cd-container\">             \r\n<p> \u4e00\u3064\u76ee\u306e\u30b3\u30f3\u30c6\u30f3\u30c4<\/p>         \r\n<\/div>     \r\n<\/div> \r\n<!--\u3053\u3053\u307e\u3067-->\r\n<!--\u30b0\u30eb\u30fc\u30d7\uff12-->\r\n<div class=\"cd-fixed-bg cd-bg-2\">         \r\n<h2><span id=\"i-3\">\u30bf\u30a4\u30c8\u30eb<\/span><\/h2>     \r\n<\/div>       \r\n<div class=\"cd-scrolling-bg \">         \r\n<div class=\"cd-container\">             \r\n<p> \u4e00\u3064\u76ee\u306e\u30b3\u30f3\u30c6\u30f3\u30c4<\/p>         \r\n<\/div>     \r\n<\/div>\r\n<!--\u3053\u3053\u307e\u3067-->\r\n<\/xmp>\r\n<\/pre>\n<p>CSS\u3082\u30b7\u30f3\u30d7\u30eb\u3067\u3059\u3002<\/p>\n<p>[CSS]<\/p>\n<pre>\r\n<xmp>\r\nbody, html, main {  \r\nheight: 100%; \r\n}   \r\n.cd-fixed-bg {     \r\nmin-height: 100%;    \r\nbackground-size: cover;     \r\nbackground-attachment: fixed;     \r\nbackground-repeat: no-repeat;     \r\nbackground-position: center center;\r\n }   \r\n.cd-fixed-bg.cd-bg-1 {   \r\nbackground-image: url(\"img\/01.jpg\"); \r\n}\r\n.cd-fixed-bg.cd-bg-2 {   \r\nbackground-image: url(\"img\/02.jpg\"); \r\n}\r\n.cd-scrolling-bg {     \r\nmin-height: 100%; \r\n} \r\n<\/xmp>\r\n<\/pre>\n<p>\u30dd\u30a4\u30f3\u30c8\u306f2\u3064\u3002<br \/>\nbackground-size: cover;<br \/>\n\u3067\u3001\u753b\u50cf\u306e\u7e26\u6a2a\u6bd4\u3092\u4fdd\u6301\u3057\u305f\u307e\u307e\u3001\u8868\u793a\u9818\u57df\u3092\u8986\u3044\u307e\u3059\u3002<br \/>\nmain\u306f\u9ad8\u3055\u304c100\uff05\u306a\u306e\u3067\u3001\u753b\u9762\u3044\u3063\u3071\u3044\u306b\u753b\u50cf\u304c\u8868\u793a\u3055\u308c\u308b\u3053\u3068\u306b\u306a\u308a\u307e\u3059\u3002<br \/>\n\u3055\u3089\u306b\u3001<br \/>\nbackground-attachment: fixed;<br \/>\n \u3067\u3001\u30b9\u30af\u30ed\u30fc\u30eb\u3057\u3066\u3082\u52d5\u304b\u306a\u3044\u3088\u3046\u306b\u80cc\u666f\u753b\u50cf\u3092\u56fa\u5b9a\u3057\u307e\u3059\u3002<br \/>\nIE9\u4ee5\u4e0a\u3067\u4f7f\u3048\u308b\u306e\u3067\u3001\u5b9f\u7528\u6027\u3082\u3042\u308a\u307e\u3059\u306d\u3002<\/p>\n<h2 style=\"color: #0083b9;\"><span id=\"i-4\">\u25a0\u30bf\u30a4\u30c8\u30eb\u3092\u4e0a\u4e0b\u5de6\u53f3\u4e2d\u592e\u306b\u914d\u7f6e\u3057\u305f\u3044\u5834\u5408<\/span><\/h2>\n<p>\u80cc\u666f\u753b\u50cf\u304c\u753b\u9762\u306e\u4e2d\u592e\u306b\u8868\u793a\u3055\u308c\u305f\u3068\u304d\u306b\u3001\u30bf\u30a4\u30c8\u30eb\u90e8\u5206\u3082\u753b\u9762\u306e\u771f\u3093\u4e2d\u306b\u914d\u7f6e\u3055\u305b\u305f\u3044\u5834\u5408\u306f\u3001\u4e0b\u8a18\u306eCSS\u3092\u8ffd\u52a0\u3057\u307e\u3059\u3002<br \/>\n\u89aa<br \/>\n[\uff44\uff49\uff56]\u306bposition:relative<br \/>\n\u3092\u4e0e\u3048\u3001\u30bf\u30a4\u30c8\u30eb\u90e8\u5206\u3092position:absolute\u3068transform\u3067\u4e2d\u592e\u914d\u7f6e\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>[CSS]<\/p>\n<pre>\r\n<xmp>\r\n.cd-fixed-bg {   \r\nposition: relative;   \r\nz-index: 1; \r\n}\r\n .cd-fixed-bg h1, .cd-fixed-bg h2 {   \r\nposition: absolute;   l\r\neft: 50%;   \r\ntop: 50%;   \r\nbottom: auto;   \r\nright: auto;   \r\n-webkit-transform: translateX(-50%) translateY(-50%);   -\r\nmoz-transform: translateX(-50%) translateY(-50%);   \r\n-ms-transform: translateX(-50%) translateY(-50%);   \r\n-o-transform: translateX(-50%) translateY(-50%);   \r\ntransform: translateX(-50%) translateY(-50%);   \r\ntext-align: center;   \r\n }\r\n<\/xmp>\r\n<\/pre>\n<p>\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u4f7f\u3063\u305f\u30d1\u30e9\u30e9\u30c3\u30af\u30b9\u306f\u5c11\u3057\u96e3\u6613\u5ea6\u304c\u9ad8\u3081\u3067\u3059\u304c\u3001\u3053\u308c\u306a\u3089\u3059\u3050\u306b\u3067\u3082\u5b9f\u88c5\u3067\u304d\u307e\u3059\u306d\u3002<br \/>\n\u304a\u624b\u8efd\u306b\u3001\u80cc\u666f\u753b\u50cf\u3092\u4f7f\u3063\u305f\u30b9\u30af\u30ed\u30fc\u30eb\u52b9\u679c\u3092\u4f7f\u3044\u305f\u3044\u6642\u306b\u3001\u305c\u3072\u8a66\u3057\u3066\u307f\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Contents0.1 \u3010CSS3\u3011CSS\u3060\u3051\u3067\u5b9f\u73fe\uff01\u80cc\u666f\u753b\u50cf\u3092\u56fa\u5b9a\uff06\u30b9\u30af\u30ed\u30fc\u30eb\u3067\u5207\u308a\u66ff\u3048\u308b\u30d1\u30e9\u30e9\u30c3\u30af\u30b9\u98a8\u52b9\u679c0.2 \u25a0\u4f7f\u3044\u65b91 \u30bf\u30a4\u30c8\u30eb1.1 \u30bf\u30a4\u30c8\u30eb1.2 \u25a0\u30bf\u30a4\u30c8\u30eb\u3092\u4e0a\u4e0b\u5de6\u53f3\u4e2d\u592e\u306b\u914d\u7f6e\u3057\u305f\u3044\u5834\u5408 \u3010CSS3\u3011CS [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":1583,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[50,45],"tags":[],"class_list":["post-1584","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-css","category-web"],"_links":{"self":[{"href":"https:\/\/dream-net.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1584","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/dream-net.org\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/dream-net.org\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/dream-net.org\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/dream-net.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1584"}],"version-history":[{"count":5,"href":"https:\/\/dream-net.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1584\/revisions"}],"predecessor-version":[{"id":1592,"href":"https:\/\/dream-net.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1584\/revisions\/1592"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/dream-net.org\/blog\/index.php?rest_route=\/wp\/v2\/media\/1583"}],"wp:attachment":[{"href":"https:\/\/dream-net.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1584"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dream-net.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1584"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dream-net.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1584"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}