{"id":5391,"date":"2026-07-09T20:01:26","date_gmt":"2026-07-09T11:01:26","guid":{"rendered":"https:\/\/dennie.tokyo\/it\/?p=5391"},"modified":"2026-07-09T20:18:57","modified_gmt":"2026-07-09T11:18:57","slug":"%e3%80%90css%e3%80%91%e8%83%8c%e6%99%af%e3%83%8f%e3%82%a4%e3%83%a9%e3%82%a4%e3%83%88","status":"publish","type":"post","link":"https:\/\/dennie.tokyo\/it\/?p=5391","title":{"rendered":"\u3010CSS\u3011\u80cc\u666f\u30cf\u30a4\u30e9\u30a4\u30c8"},"content":{"rendered":"\n<p>\u30db\u30d0\u30fc\u3059\u308b\u3068\u80cc\u666f\u304c\u30cf\u30a4\u30e9\u30a4\u30c8\u3055\u308c\u308b\u30ae\u30df\u30c3\u30af\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<!--more-->\n\n\n\n<h1 class=\"wp-block-heading\">\u5b9f\u88c5<\/h1>\n\n\n\n<p><strong>HTML<\/strong><\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-html\" data-lang=\"HTML\"><code>&lt;a href=&quot;#&quot; class=&quot;sample&quot;&gt;\u30db\u30fc\u30e0&lt;\/a&gt;<\/code><\/pre><\/div>\n\n\n\n<p><strong>CSS<\/strong><\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-css\" data-lang=\"CSS\"><code>.sample {\n  color: #000000;\n  font-size: 1rem;\n  text-decoration: none;\n  padding: 10px;\n  display: inline-block;\n  position: relative;\n  border: 1px solid #296971;\n  transition: 0.2s ease; \/* \u6587\u5b57\u8272\u304c\u5909\u308f\u308b\u30b9\u30d4\u30fc\u30c9 *\/\n}\n\n.sample::before {\n  content: &quot;&quot;;\n  position: absolute;\n  top: 0;\n  left: 0;\n  width: 0;\n  height: 100%;\n  background-color: #296971;\n  transition: 0.2s ease; \/* \u4f38\u3073\u308b\u30b9\u30d4\u30fc\u30c9 *\/\n  z-index: -1; \/* \u30c6\u30ad\u30b9\u30c8\u306e\u5f8c\u308d\u306b\u914d\u7f6e *\/\n}\n\n.sample:hover::before {\n  width: 100%;\n}\n\n.sample:hover {\n  color: #ffffff;\n}<\/code><\/pre><\/div>\n\n\n\n<p><strong>\u7d50\u679c<\/strong><\/p>\n\n\n\n<style>\n.sample {\n  color: #000000;\n  font-size: 1rem;\n  text-decoration: none;\n  padding: 10px;\n  display: inline-block;\n  position: relative;\n  border: 1px solid #296971;\n  transition: 0.2s ease; \/* \u6587\u5b57\u8272\u304c\u5909\u308f\u308b\u30b9\u30d4\u30fc\u30c9 *\/\n}\n\n.sample::before {\n  content: \"\";\n  position: absolute;\n  top: 0;\n  left: 0;\n  width: 0;\n  height: 100%;\n  background-color: #296971;\n  transition: 0.2s ease; \/* \u4f38\u3073\u308b\u30b9\u30d4\u30fc\u30c9 *\/\n  z-index: -1; \/* \u30c6\u30ad\u30b9\u30c8\u306e\u5f8c\u308d\u306b\u914d\u7f6e *\/\n}\n\n.sample:hover::before {\n  width: 100%;\n}\n\n.sample:hover {\n  color: #ffffff;\n}\n\n<\/style>\n<a href=\"#\" class=\"sample\">\u30db\u30fc\u30e0<\/a>\n\n\n\n<p>\u7406\u89e3\u3092\u6df1\u3081\u308b\u70ba\u306b\u3001\u4ee5\u4e0b\u3092\u53c2\u8003\u3057\u3066\u4e0b\u3055\u3044\u3002<\/p>\n\n\n\n<div class=\"title_box\"><span class=\"box-title\">\u53c2\u8003<\/span>\n<p><a href=\"https:\/\/dennie.tokyo\/it\/?p=5380\" rel=\"noopener noreferrer\" target=\"_blank\">z-index \u306b\u3064\u3044\u3066<\/a><\/p>\n<\/div>\n\n\n\n<h1 class=\"wp-block-heading\">\u5fdc\u7528\u30d1\u30bf\u30fc\u30f3<\/h1>\n\n\n\n<h2 class=\"wp-block-heading\">\u30d1\u30bf\u30fc\u30f31<\/h2>\n\n\n\n<p><strong>HTML<\/strong><\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-html\" data-lang=\"HTML\"><code>&lt;a href=&quot;#&quot; class=&quot;btn btn-1&quot;&gt;\u30db\u30fc\u30e0&lt;\/a&gt;<\/code><\/pre><\/div>\n\n\n\n<p><strong>CSS<\/strong><\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-css\" data-lang=\"CSS\"><code>a.btn {\n  text-decoration: none;\n  line-height: 80px;\n  color: black;\n  text-align: center;\n}\n\n.btn {\n  position: relative;\n  display: block;\n  overflow: hidden;\n  width: 100%;\n  height: 80px;\n  max-width: 250px;\n  text-transform: uppercase;\n  border: 1px solid #296971;\n}\n\n.btn-1 {\n  color: #296971;\n  transition: color 0.5s ease-in-out;\n}\n\n.btn-1:before {\n  content: &quot;&quot;;\n  position: absolute;\n  top: 0;\n  right: -50px;\n  bottom: 0;\n  left: 0;\n  border-right: 50px solid transparent;\n  border-bottom: 80px solid #296971;\n  transform: translateX(-100%);\n  transition: 0.5s ease-in-out;\n  z-index: -1;\n}\n\n.btn-1:hover {\n  color: #d0ebee;\n}\n\n.btn-1:hover:before {\n  transform: translateX(0);\n}<\/code><\/pre><\/div>\n\n\n\n<p><strong>\u7d50\u679c<\/strong><\/p>\n\n\n\n<style>\na.btn-sample {\n  text-decoration: none;\n  line-height: 80px;\n  color: black;\n  text-align: center;\n}\n\n.btn-sample {\n  position: relative;\n  display: block;\n  overflow: hidden;\n  width: 100%;\n  height: 80px;\n  max-width: 250px;\n  text-transform: uppercase;\n  border: 1px solid #296971;\n}\n\n.btn-sample-1 {\n  color: #296971;\n  transition: color 0.5s ease-in-out;\n}\n\n.btn-sample-1:before {\n  content: \"\";\n  position: absolute;\n  top: 0;\n  right: -50px;\n  bottom: 0;\n  left: 0;\n  border-right: 50px solid transparent;\n  border-bottom: 80px solid #296971;\n  transform: translateX(-100%);\n  transition: 0.5s ease-in-out;\n  z-index: -1;\n}\n\n.btn-sample-1:hover {\n  color: #d0ebee;\n}\n\n.btn-sample-1:hover:before {\n  transform: translateX(0);\n}\n\n<\/style>\n<a href=\"#\" class=\"btn-sample btn-sample-1\">\u30db\u30fc\u30e0<\/a>\n\n\n\n<h1 class=\"wp-block-heading\">\u6700\u5f8c\u306b<\/h1>\n\n\n\n<p>\u7279\u306b\u3042\u308a\u307e\u305b\u3093\u3002<\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u30db\u30d0\u30fc\u3059\u308b\u3068\u80cc\u666f\u304c\u30cf\u30a4\u30e9\u30a4\u30c8\u3055\u308c\u308b\u30ae\u30df\u30c3\u30af\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002<\/p>\n","protected":false},"author":1,"featured_media":4723,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9],"tags":[],"class_list":["post-5391","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-css"],"_links":{"self":[{"href":"https:\/\/dennie.tokyo\/it\/index.php?rest_route=\/wp\/v2\/posts\/5391","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/dennie.tokyo\/it\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/dennie.tokyo\/it\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/dennie.tokyo\/it\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/dennie.tokyo\/it\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=5391"}],"version-history":[{"count":7,"href":"https:\/\/dennie.tokyo\/it\/index.php?rest_route=\/wp\/v2\/posts\/5391\/revisions"}],"predecessor-version":[{"id":5398,"href":"https:\/\/dennie.tokyo\/it\/index.php?rest_route=\/wp\/v2\/posts\/5391\/revisions\/5398"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/dennie.tokyo\/it\/index.php?rest_route=\/wp\/v2\/media\/4723"}],"wp:attachment":[{"href":"https:\/\/dennie.tokyo\/it\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=5391"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dennie.tokyo\/it\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=5391"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dennie.tokyo\/it\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=5391"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}