{"id":390,"date":"2017-08-04T15:48:15","date_gmt":"2017-08-04T06:48:15","guid":{"rendered":"https:\/\/p-corporate-blog-cms.mmmcorp.co.jp\/blog\/2017\/08\/04\/css_shapes"},"modified":"2017-08-04T15:48:15","modified_gmt":"2017-08-04T06:48:15","slug":"css_shapes","status":"publish","type":"post","link":"https:\/\/p-corporate-blog-cms.mmmcorp.co.jp\/blog\/2017\/08\/04\/css_shapes\/","title":{"rendered":"CSS\u3067\u56f3\u5f62\u3092\u63cf\u304f"},"content":{"rendered":"

\"\"<\/p>\n

\u5c0f\u5b66\u751f\u306e\u9577\u5973\u304c\u590f\u4f11\u307f\u306b\u5165\u308a\u3001\u4eca\u5e74\u3082\u307e\u305f\u304a\u5f01\u5f53\u4f5c\u308a\u306b\u60a9\u307e\u3055\u308c\u3066\u3044\u308b\u6c60\u5cf6\u3067\u3059\u3002
\n\u5148\u9031\u3001\u79cb\u7530\u306e\u5b9f\u5bb6\u306b\u5e30\u7701\u3057\u307e\u3057\u305f\u304c\u3001\u6bce\u56de\u3001\u4eba\u306e\u5c11\u306a\u3055\u306b\u300c\u770c\u6d88\u6ec5\u300d\u306e\u5371\u6a5f\u3092\u5b9f\u611f\u3057\u307e\u3059\u3002<\/p>\n

\u3055\u3066\u4ee5\u524d\u3001CSS\u3067\u77e2\u5370<\/a>\u3084\u30d5\u30ad\u30c0\u30b7<\/a>\u3092\u8868\u793a\u3055\u305b\u308b\u65b9\u6cd5\u3092\u3054\u7d39\u4ecb\u3057\u307e\u3057\u305f\u304c\u3001\u3053\u308c\u3089\u306e\u5143\u3068\u306a\u308b\u56f3\u5f62\u3092CSS\u3067\u8868\u793a\u3055\u305b\u308b\u65b9\u6cd5\u3092\u3054\u7d39\u4ecb\u3057\u305f\u3044\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n

\u4e8c\u7b49\u8fba\u4e09\u89d2\u5f62<\/h2>\n

\u5e95\u8fba\u304b\u3089\u306e\u9ad8\u3055\u3092\u5e95\u8fba\u306e\u30dc\u30fc\u30c0\u30fc\u30b5\u30a4\u30ba\u3067\u8a2d\u5b9a\u3057\u3001\u5de6\u53f3\u306e\u6b20\u3051\u308b\u90e8\u5206\u3092transparent<\/code>\u306e\u30dc\u30fc\u30c0\u30fc\u3067\u4f5c\u308a\u307e\u3059\u3002<\/p>\n

\"\"<\/p>\n

HTML<\/strong><\/p>\n

<p>\u4e8c\u7b49\u8fba\u4e09\u89d2\u5f62<\/p>\n<div class="isosceles-triangle"><\/div><\/code><\/pre>\n

CSS<\/strong><\/p>\n

.isosceles-triangle{\n  width: 0;\n  height: 0;\n  border-left: 200px solid transparent;\n  border-right: 200px solid transparent;\n  border-bottom: 100px solid #666;\n}<\/code><\/pre>\n

\u76f4\u89d2\u4e09\u89d2\u5f62<\/h2>\n

\u4e8c\u7b49\u8fba\u4e09\u89d2\u5f62\u3068\u3001\u57fa\u672c\u7684\u306a\u4f5c\u308a\u65b9\u306f\u540c\u3058\u3067\u3059\u3002
\nborder<\/code>\u306e\u6307\u5b9a\u304c\uff12\u7b87\u6240\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n

\"\"<\/p>\n

HTML<\/strong><\/p>\n

<p>\u76f4\u89d2\u4e09\u89d2\u5f62<\/p>\n<div class="right-triangle"><\/div><\/code><\/pre>\n

CSS<\/strong><\/p>\n

.right-triangle {\n  width: 0;\n  height: 0;\n  border-right: 200px solid transparent;\n  border-bottom: 100px solid #666;\n}<\/code><\/pre>\n

border<\/code>\u6307\u5b9a\u3092top<\/code>\u3068left<\/code>\u306b\u5909\u3048\u3066\u3082\u3001\u540c\u3058\u56f3\u5f62\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n

\"\"<\/p>\n

HTML<\/strong><\/p>\n

<p>\u76f4\u89d2\u4e09\u89d2\u5f622<\/p>\n<div class="right-triangle2"><\/div><\/code><\/pre>\n

CSS<\/strong><\/p>\n

.right-triangle2 {\n  width: 0;\n  height: 0;\n  border-top: 100px solid transparent;\n  border-left: 200px solid #666;\n}<\/code><\/pre>\n

\u5e73\u884c\u56db\u8fba\u5f62<\/h2>\n

transform<\/code>\u3092\u4f7f\u3063\u3066\u3001\u9577\u65b9\u5f62\u3092\u50be\u659c\u3055\u305b\u307e\u3059\u3002
\n\u3053\u306e\u5834\u5408\u3001\u5909\u5f62\u306e\u57fa\u70b9\u306f\u30dc\u30c3\u30af\u30b9\u306e\u4e2d\u5fc3\u306b\u306a\u308a\u307e\u3059\u306e\u3067\u3001\u5de6\u4e0a\u3092\u57fa\u70b9\u306b\u3057\u305f\u3044\u5834\u5408\u306f
\ntransform-origin: left top<\/code> \u3092\u4f7f\u3044\u307e\u3059\u3002<\/p>\n

\u6b21\u306e\u9805\u76ee\u306e\u3001\u53f0\u5f62\u306e\u4f5c\u308a\u65b9\u3092\u4f7f\u3063\u3066\u3082\u4f5c\u308c\u307e\u3059\u3002<\/p>\n

\"\"<\/p>\n

HTML<\/strong><\/p>\n

<p>\u5e73\u884c\u56db\u8fba\u5f62<\/p>\n<div class="parallelogram"><\/div><\/code><\/pre>\n

CSS<\/strong><\/p>\n

.parallelogram {\n  width: 200px;\n  height: 100px;\n  background: #666;\n  transform: skewX(-30deg);\n}<\/code><\/pre>\n

\u53f0\u5f62<\/h2>\n

\u9577\u65b9\u5f62\u306e\u5de6\u53f3\u306b\u3001\u76f4\u89d2\u4e09\u89d2\u5f62\u3092\u304f\u3063\u3064\u3051\u307e\u3059\u3002
\n\u5206\u304b\u308a\u3084\u3059\u3044\u3088\u3046\u306b\u3001\u5de6\u53f3\u306e\u4e09\u89d2\u5f62\u306e\u8272\u3092\u5909\u3048\u307e\u3057\u305f\u3002<\/p>\n

\"\"<\/p>\n

HTML<\/strong><\/p>\n

<p>\u53f0\u5f62<\/p>\n<div class="trapezoid"><\/div><\/code><\/pre>\n

CSS<\/strong><\/p>\n

.trapezoid {\n  position: relative;\n  margin-left: 30px;\n  width: 200px;\n  height: 100px;\n  background: #666;\n}\n.trapezoid:before {\n  content: "";\n  position: absolute;\n  top: 0;\n  right: 100%;\n  width: 0;\n  height: 0;\n  border-left: 30px solid transparent;\n  border-bottom: 100px solid #999;\n}\n.trapezoid:after {\n  content: "";\n  position: absolute;\n  top: 0;\n  left: 100%;\n  width: 0;\n  height: 0;\n  border-right: 30px solid transparent;\n  border-bottom: 100px solid #999;\n}<\/code><\/pre>\n

\u83f1\u5f62<\/h2>\n

\uff12\u7b49\u8fba\u4e09\u89d2\u5f62\u3092\uff12\u3064\u304f\u3063\u3064\u3051\u307e\u3059\u3002
\n\u5de6\u53f3\u914d\u7f6e\u3088\u308a\u3001\u4e0a\u4e0b\u914d\u7f6e\u304c\u7c21\u5358\u3067\u3044\u3044\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u3002<\/p>\n

\"\"<\/p>\n

HTML<\/strong><\/p>\n

<p>\u83f1\u5f62<\/p>\n<div class="lozenge">\n  <div class="lozenge__top"><\/div>\n  <div class="lozenge__bottom"><\/div>\n<\/div><\/code><\/pre>\n

CSS<\/strong><\/p>\n

.lozenge__top {\n  width: 0;\n  height: 0;\n  border-left: 100px solid transparent;\n  border-right: 100px solid transparent;\n  border-bottom: 150px solid #666;\n}\n.lozenge__bottom {\n  width: 0;\n  height: 0;\n  border-top: 150px solid #999;\n  border-left: 100px solid transparent;\n  border-right: 100px solid transparent;\n}<\/code><\/pre>\n

\u5186<\/h2>\n

\u6b63\u65b9\u5f62\u3092\u4f5c\u3063\u3066\u3001\u89d2\u4e38\u3092\u4f7f\u3063\u3066\u5186\u306b\u3057\u307e\u3059\u3002
\n\u89d2\u4e38\u306e\u30b5\u30a4\u30ba\u309250%<\/code>\u306b\u3057\u3066\u304a\u3051\u3070\u3001\u6b63\u65b9\u5f62\u306e\u5927\u304d\u3055\u304c\u5909\u308f\u3063\u3066\u3082\u3001\u6570\u5024\u306e\u5909\u66f4\u304c\u4e0d\u8981\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n

\"\"<\/p>\n

HTML<\/strong><\/p>\n

<p>\u5186<\/p>\n<div class="circle"><\/div><\/code><\/pre>\n

CSS<\/strong><\/p>\n

.circle {\n  width: 180px;\n  height: 180px;\n  background: #666;\n  border-radius: 50%;\n}<\/code><\/pre>\n

\u6955\u5186<\/h2>\n

\u5186\u306e\u7e26\u6a2a\u6bd4\u3092\u5909\u3048\u308b\u3060\u3051\u3067\u3059\u3002\u7c21\u5358\u3067\u3059\u306d\u3002<\/p>\n

\"\"<\/p>\n

HTML<\/strong><\/p>\n

<p>\u6955\u5186<\/p>\n<div class="oval"><\/div><\/code><\/pre>\n

CSS<\/strong><\/p>\n

.oval {\n  width: 200px;\n  height: 150px;\n  background: #666;\n  border-radius: 50%;\n}<\/code><\/pre>\n

\u6700\u5f8c\u306b<\/h2>\n

CSS\u306e\u9032\u6b69\u306b\u3088\u3063\u3066\u3001\u753b\u50cf\u306b\u983c\u3089\u306a\u304f\u3066\u3082\u8272\u3005\u306a\u56f3\u5f62\u304c\u63cf\u3051\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3057\u305f\u3002
\n\u57fa\u672c\u7684\u306a\u56f3\u5f62\u3070\u304b\u308a\u3067\u3001\u96e3\u3057\u304f\u306f\u3042\u308a\u307e\u305b\u3093\u304c\u3001\u69d8\u3005\u306a\u3053\u3068\u306b\u5fdc\u7528\u3067\u304d\u307e\u3059\u3002<\/p>\n

\u4f8b\u3048\u3070\u3001\u753b\u50cf\u3067\u306f\u306a\u304f\u3001CSS\u3092\u4f7f\u3063\u3066\u56f3\u5f62\u3092\u8868\u3059\u3053\u3068\u3067\u3001\u30ec\u30b9\u30dd\u30f3\u30b7\u30d6\u5bfe\u5fdc\u3084\u30e1\u30f3\u30c6\u30ca\u30f3\u30b9\u304c\u3057\u3084\u3059\u3044\u56f3\u8868\u304c\u4f5c\u6210\u3067\u304d\u307e\u3059\u3002
\n\u3061\u3087\u3063\u3068\u30c6\u30ad\u30b9\u30c8\u3092\u5909\u3048\u305f\u3044\u3068\u304b\u3001\u90e8\u5206\u7684\u306b\u8ffd\u52a0\u3084\u524a\u9664\u3092\u884c\u3044\u305f\u3044\u5834\u5408\u306b\u4fbf\u5229\u3067\u3059\u3002<\/p>\n

\u30ea\u30b9\u30c8\u306e\u4e38\u6570\u5b57\u3084\u30b3\u30f3\u30c6\u30f3\u30c4\u306e\u56f2\u307f\u306b\u3082\u4f7f\u3048\u307e\u3059\u306d\u3002
\n\u4ed6\u306b\u3082\u3001\u3069\u3093\u306a\u4f7f\u3044\u65b9\u304c\u3067\u304d\u308b\u304b\u8003\u3048\u3066\u307f\u305f\u3044\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"

\u5c0f\u5b66\u751f\u306e\u9577\u5973\u304c\u590f\u4f11\u307f\u306b\u5165\u308a\u3001\u4eca\u5e74\u3082\u307e\u305f\u304a\u5f01\u5f53\u4f5c\u308a\u306b\u60a9\u307e\u3055\u308c\u3066\u3044\u308b\u6c60\u5cf6\u3067\u3059\u3002 \u5148\u9031\u3001\u79cb\u7530\u306e\u5b9f\u5bb6\u306b\u5e30\u7701\u3057\u307e\u3057\u305f\u304c\u3001\u6bce\u56de\u3001\u4eba\u306e\u5c11\u306a\u3055\u306b\u300c\u770c\u6d88\u6ec5\u300d\u306e\u5371\u6a5f\u3092\u5b9f\u611f\u3057\u307e\u3059\u3002 \u3055\u3066\u4ee5\u524d\u3001CSS\u3067\u77e2\u5370\u3084\u30d5\u30ad\u30c0\u30b7\u3092\u8868\u793a\u3055\u305b\u308b\u65b9\u6cd5\u3092\u3054\u7d39\u4ecb\u3057\u307e\u3057\u305f\u304c\u3001\u3053\u308c\u3089\u306e\u5143\u3068\u306a\u308b\u56f3\u5f62\u3092CSS\u3067\u8868\u793a\u3055\u305b\u308b\u65b9\u6cd5\u3092\u3054\u7d39\u4ecb\u3057\u305f\u3044\u3068\u601d\u3044\u307e\u3059\u3002 \u4e8c\u7b49\u8fba\u4e09\u89d2\u5f62 \u5e95\u8fba\u304b\u3089\u306e\u9ad8\u3055\u3092\u5e95\u8fba\u306e\u30dc\u30fc\u30c0\u30fc\u30b5\u30a4\u30ba\u3067\u8a2d\u5b9a\u3057\u3001\u5de6\u53f3\u306e\u6b20\u3051\u308b\u90e8\u5206\u3092transparent […]<\/p>\n","protected":false},"author":1,"featured_media":826,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[10],"tags":[160],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/p-corporate-blog-cms.mmmcorp.co.jp\/wp-json\/wp\/v2\/posts\/390"}],"collection":[{"href":"https:\/\/p-corporate-blog-cms.mmmcorp.co.jp\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/p-corporate-blog-cms.mmmcorp.co.jp\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/p-corporate-blog-cms.mmmcorp.co.jp\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/p-corporate-blog-cms.mmmcorp.co.jp\/wp-json\/wp\/v2\/comments?post=390"}],"version-history":[{"count":0,"href":"https:\/\/p-corporate-blog-cms.mmmcorp.co.jp\/wp-json\/wp\/v2\/posts\/390\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/p-corporate-blog-cms.mmmcorp.co.jp\/wp-json\/wp\/v2\/media\/826"}],"wp:attachment":[{"href":"https:\/\/p-corporate-blog-cms.mmmcorp.co.jp\/wp-json\/wp\/v2\/media?parent=390"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/p-corporate-blog-cms.mmmcorp.co.jp\/wp-json\/wp\/v2\/categories?post=390"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/p-corporate-blog-cms.mmmcorp.co.jp\/wp-json\/wp\/v2\/tags?post=390"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}