{"id":1248,"date":"2011-11-03T23:04:07","date_gmt":"2011-11-03T14:04:07","guid":{"rendered":"http:\/\/codaholic.org\/?p=1248"},"modified":"2020-08-24T10:07:00","modified_gmt":"2020-08-24T01:07:00","slug":"cssjquery%e7%ad%89%e3%82%92%e4%bd%bf%e3%81%a3%e3%81%a6margin-top%e3%81%ae%e5%80%a4%e3%82%92%e5%8f%96%e5%be%97%e3%81%99%e3%82%8b%e6%99%82%e3%81%ae%e6%b3%a8%e6%84%8f%e7%82%b9","status":"publish","type":"post","link":"https:\/\/codaholic.org\/?p=1248","title":{"rendered":"[CSS] jQuery \u7b49\u3092\u4f7f\u3063\u3066 margin-top \u306e\u5024\u3092\u53d6\u5f97\u3059\u308b\u6642\u306e\u6ce8\u610f\u70b9"},"content":{"rendered":"<p>jQuery(Javascript)\u3092\u4f7f\u3063\u3066\u3042\u308b HTML \u8981\u7d20\u306e margin-top \u3092\u53d6\u5f97\u3059\u308b\u3068\u304d\u306f\u3001\u30d6\u30e9\u30a6\u30b6\u306b\u3088\u3063\u3066\u8fd4\u3055\u308c\u308b\u5024\u304c\u9055\u3046\u53ef\u80fd\u6027\u304c\u3042\u308b\u306e\u3067\u6ce8\u610f\u304c\u5fc5\u8981\u3067\u3059\u3002\u5177\u4f53\u7684\u306b\u305d\u306e\u9055\u3044\u3092\u78ba\u8a8d\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u30b3\u30fc\u30c9\u3092\u4e0b\u8a18\u306b\u793a\u3057\u307e\u3059\u3002<\/p>\n<p><!--more--><\/p>\n<p>id\u300choge\u300d\u304c\u6307\u5b9a\u3055\u308c\u305f\u8981\u7d20\u306emargin-top\u3092\u53d6\u5f97\u3057\u3066alert\u3067\u8868\u793a\u3057\u307e\u3059\u3002<\/p>\n<pre><code class=\"language-html\">&lt;html&gt;\n    &lt;head&gt;\n        &lt;meta charset=\"UTF-8\" \/&gt;\n        &lt;script type=\"text\/javascript\" src=\"jquery.js\"&gt;&lt;\/script&gt;\n        &lt;script type=\"text\/javascript\"&gt;\n            $(function(){\n                alert($('#hoge').css('margin-top')); \/\/\u3053\u3053\u3067\u8868\u793a\u3055\u308c\u308b\u5024\u304c\u30d6\u30e9\u30a6\u30b6\u3067\u9055\u3044\u307e\u3059\n            });\n        &lt;\/script&gt;\n        &lt;style type=\"text\/css\"&gt;\n            #hoge{\n                width: 100px;\n                height: 100px;\n                background: #cccccc;\n            }\n        &lt;\/style&gt;\n    &lt;\/head&gt;\n    &lt;body&gt;\n        &lt;div id=\"hoge\"&gt;&lt;\/div&gt;\n    &lt;\/body&gt;\n&lt;\/html&gt;\n<\/code><\/pre>\n<p>\u5404\u30d6\u30e9\u30a6\u30b6\u3067\u5b9f\u884c\u3057\u305f\u7d50\u679c\u306f\u4e0b\u8a18\u306e\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>Chrome\u6700\u65b0\u7248: 0px<br \/>\nFirefox\u6700\u65b0\u7248: 0px<br \/>\nIE6: auto<br \/>\nIE7: auto<br \/>\nIE8: auto<\/p>\n<p>\u8a08\u7b97\u306b\u4f7f\u3046\u5834\u5408\u306fIE\u3067\u3046\u307e\u304f\u3044\u304d\u307e\u305b\u3093\u306e\u3067\u6ce8\u610f\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u3053\u308c\u3092\u56de\u907f\u3059\u308b\u306b\u306f\u3001\u4e0b\u8a18\u306e\u3088\u3046\u306b\u8a08\u7b97\u306b\u4f7f\u3046\u524d\u306b\u4e88\u3081\u521d\u671f\u5316\u3057\u3066\u304a\u304f\u3068\u826f\u3044\u3067\u3059\u3002<\/p>\n<pre><code>$(function(){\n    $('#hoge').css('margin-top', 0);\n    alert($('#hoge').css('margin-top'));\n});\n<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>jQuery(Javascript)\u3092\u4f7f\u3063\u3066\u3042\u308b HTML \u8981\u7d20\u306e margin-top \u3092\u53d6\u5f97\u3059\u308b\u3068\u304d\u306f\u3001\u30d6\u30e9\u30a6\u30b6\u306b\u3088\u3063\u3066\u8fd4\u3055\u308c\u308b\u5024\u304c\u9055\u3046\u53ef\u80fd\u6027\u304c\u3042\u308b\u306e\u3067\u6ce8\u610f\u304c\u5fc5\u8981\u3067\u3059\u3002\u5177\u4f53\u7684\u306b\u305d\u306e\u9055\u3044\u3092\u78ba\u8a8d\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u30b3\u30fc\u30c9\u3092\u4e0b [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","jetpack_publicize_message":"","jetpack_is_tweetstorm":false,"jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","enabled":false}}},"categories":[21,7,5,6],"tags":[252,247,245,246],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p8gd1W-k8","_links":{"self":[{"href":"https:\/\/codaholic.org\/index.php?rest_route=\/wp\/v2\/posts\/1248"}],"collection":[{"href":"https:\/\/codaholic.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/codaholic.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/codaholic.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/codaholic.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1248"}],"version-history":[{"count":5,"href":"https:\/\/codaholic.org\/index.php?rest_route=\/wp\/v2\/posts\/1248\/revisions"}],"predecessor-version":[{"id":2535,"href":"https:\/\/codaholic.org\/index.php?rest_route=\/wp\/v2\/posts\/1248\/revisions\/2535"}],"wp:attachment":[{"href":"https:\/\/codaholic.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1248"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/codaholic.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1248"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/codaholic.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1248"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}