{"id":1329,"date":"2025-04-24T01:45:52","date_gmt":"2025-04-24T01:45:52","guid":{"rendered":"https:\/\/satokotadesign.com\/blog\/?p=1329"},"modified":"2025-05-16T02:17:59","modified_gmt":"2025-05-16T02:17:59","slug":"draganddrop","status":"publish","type":"post","link":"https:\/\/satokotadesign.com\/blog\/draganddrop\/","title":{"rendered":"HTML\u30fbCSS\u30fbJavaScript\u3067\u5b9f\u88c5\uff01\u8907\u6570\u30a2\u30a4\u30c6\u30e0\u5bfe\u5fdc\u306e\u30c9\u30e9\u30c3\u30b0\uff06\u30c9\u30ed\u30c3\u30d7\u6a5f\u80fd\u306e\u4f5c\u308a\u65b9"},"content":{"rendered":"<p>\u3053\u3093\u306b\u3061\u306f\uff01\u9759\u5ca1\u770c\u6d5c\u677e\u5e02\u3067WEB\u30c7\u30b6\u30a4\u30ca\u30fc\u3092\u3057\u3066\u3044\u307e\u3059\u5c0f\u7027\u3067\u3059\u3002<\/p>\n<p>\u30c9\u30e9\u30c3\u30b0\uff06\u30c9\u30ed\u30c3\u30d7\u6a5f\u80fd\u3063\u3066\u3001\u3061\u3087\u3063\u3068\u96e3\u3057\u305d\u3046\u306b\u898b\u3048\u307e\u305b\u3093\u304b\uff1f<br \/>\n\u3067\u3082\u5b9f\u306f\u3001HTML\u30fbCSS\u30fbJavaScript\u3092\u4f7f\u3048\u3070\u3001\u57fa\u672c\u7684\u306a\u3082\u306e\u306a\u3089\u610f\u5916\u3068\u7c21\u5358\u306b\u4f5c\u308c\u307e\u3059\u3002<\/p>\n<p>\u3053\u306e\u8a18\u4e8b\u3067\u306f\u3001\u30de\u30a6\u30b9\u3067\u8981\u7d20\u3092\u30c9\u30e9\u30c3\u30b0\u3057\u3001\u6307\u5b9a\u306e\u4f4d\u7f6e\u306b\u30c9\u30ed\u30c3\u30d7\u3067\u304d\u308b\u4ed5\u7d44\u307f\u3092\u5b9f\u88c5\u3059\u308b\u65b9\u6cd5\u3092\u4e01\u5be7\u306b\u89e3\u8aac\u3057\u307e\u3059\u3002<\/p>\n<p>\u300cToDo\u30ea\u30b9\u30c8\u3092\u30c9\u30e9\u30c3\u30b0\u3067\u4e26\u3073\u66ff\u3048\u305f\u3044\u300d\u300c\u753b\u50cf\u3084\u30d1\u30fc\u30c4\u3092\u597d\u304d\u306a\u4f4d\u7f6e\u306b\u79fb\u52d5\u3055\u305b\u305f\u3044\u300d\u305d\u3093\u306aUI\u3092\u4f5c\u308a\u305f\u3044\u65b9\u306f\u305c\u3072\u53c2\u8003\u306b\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<h2 class=\"sc_heading solid blue\"><span class=\"sc_title\">\u30c9\u30e9\u30c3\u30b0\uff06\u30c9\u30ed\u30c3\u30d7\u3063\u3066\u4f55\uff1f\u3069\u3093\u306a\u5834\u9762\u3067\u4f7f\u3046\u306e\uff1f<\/span><\/h2>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/satokotadesign.com\/blog\/wp-content\/uploads\/2025\/04\/0424-1.jpg\" alt=\"\" width=\"1280\" height=\"720\" class=\"alignnone size-full wp-image-1336\" srcset=\"https:\/\/satokotadesign.com\/blog\/wp-content\/uploads\/2025\/04\/0424-1.jpg 1280w, https:\/\/satokotadesign.com\/blog\/wp-content\/uploads\/2025\/04\/0424-1-500x281.jpg 500w, https:\/\/satokotadesign.com\/blog\/wp-content\/uploads\/2025\/04\/0424-1-1024x576.jpg 1024w, https:\/\/satokotadesign.com\/blog\/wp-content\/uploads\/2025\/04\/0424-1-768x432.jpg 768w\" sizes=\"auto, (max-width: 1280px) 100vw, 1280px\" \/><br \/>\n\u300c\u30c9\u30e9\u30c3\u30b0\uff06\u30c9\u30ed\u30c3\u30d7\u300d\u3068\u306f\u3001\u30de\u30a6\u30b9\u3067\u8981\u7d20\u3092\u63b4\u3093\u3067\u3001\u5225\u306e\u5834\u6240\u306b\u79fb\u52d5\u3055\u305b\u308bUI\u64cd\u4f5c\u306e\u3053\u3068\u3067\u3059\u3002<br \/>\n\u4f8b\u3048\u3070\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u5834\u9762\u3067\u6d3b\u7528\u3055\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n<div class=\"sc_designlist ul fa_check blue\">\n<ul>\n<li>Gmail\u3067\u306e\u30e9\u30d9\u30eb\u4ed8\u3051<\/li>\n<li>Trello\u306a\u3069\u306e\u30bf\u30b9\u30af\u30ab\u30fc\u30c9\u306e\u79fb\u52d5<\/li>\n<li>\u753b\u50cf\u3092\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u3059\u308bUI<\/li>\n<li>Notion\u3067\u30d6\u30ed\u30c3\u30af\u3092\u4e26\u3079\u66ff\u3048\u308b<\/li>\n<\/ul>\n<\/div>\n<p>\u8996\u899a\u7684\u306b\u3082\u76f4\u611f\u7684\u306b\u3082\u5206\u304b\u308a\u3084\u3059\u3044UI\u3068\u3057\u3066\u3001\u30e6\u30fc\u30b6\u30fc\u4f53\u9a13\u5411\u4e0a\u306b\u4e00\u5f79\u8cb7\u3063\u3066\u3044\u307e\u3059\u3002<\/p>\n<h2 class=\"sc_heading solid blue\"><span class=\"sc_title\">\u57fa\u672c\u306e\u5b9f\u88c5\uff1aHTML\u3068CSS\u3067\u898b\u305f\u76ee\u3092\u4f5c\u308d\u3046<\/span><\/h2>\n<p class=\"codepen\" data-height=\"300\" data-default-tab=\"html,result\" data-slug-hash=\"azzpWaL\" data-pen-title=\"Untitled\" data-user=\"ekwwawpb-the-styleful\" style=\"height: 300px; box-sizing: border-box; display: flex; align-items: center; justify-content: center; border: 2px solid; margin: 1em 0; padding: 1em;\">\n  <span>See the Pen <a href=\"https:\/\/codepen.io\/ekwwawpb-the-styleful\/pen\/azzpWaL\"><br \/>\n  Untitled<\/a> by \u5c0f\u7027\u8ce2 (<a href=\"https:\/\/codepen.io\/ekwwawpb-the-styleful\">@ekwwawpb-the-styleful<\/a>)<br \/>\n  on <a href=\"https:\/\/codepen.io\">CodePen<\/a>.<\/span>\n<\/p>\n<p><script async src=\"https:\/\/public.codepenassets.com\/embed\/index.js\"><\/script><\/p>\n<h3 class=\"sc_heading bborder b blue\"><span class=\"sc_title\">1. HTML\u306e\u69cb\u9020\u3092\u4f5c\u6210<\/span><\/h3>\n<p>\u307e\u305a\u306f\u3001\u30c9\u30e9\u30c3\u30b0\u5bfe\u8c61\u3068\u30c9\u30ed\u30c3\u30d7\u5148\u306e\u8981\u7d20\u3092\u7528\u610f\u3057\u307e\u3059\u3002draggable=\"true\" \u5c5e\u6027\u3092\u6307\u5b9a\u3059\u308b\u3053\u3068\u3067\u3001\u30c9\u30e9\u30c3\u30b0\u304c\u53ef\u80fd\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<pre class=\"line-numbers\"><code class=\"language-markup\"><div id=\"drag1\" draggable=\"true\" class=\"draggable\">\u3053\u3053\u3092\u30c9\u30e9\u30c3\u30b0<\/div> \r\n<div id=\"dropzone\" class=\"dropzone\">\u3053\u3053\u306b\u30c9\u30ed\u30c3\u30d7<\/div>\r\n<\/code><\/pre>\n<h3 class=\"sc_heading bborder b blue\"><span class=\"sc_title\">2. CSS\u3067\u88c5\u98fe<\/span><\/h3>\n<p>\u6700\u4f4e\u9650\u306e\u30b9\u30bf\u30a4\u30eb\u3067\u898b\u3084\u3059\u304f\u6574\u3048\u307e\u3057\u3087\u3046\u3002<\/p>\n<pre class=\"line-numbers\"><code class=\"language-css\">.draggable {\r\n  width: 150px;\r\n  padding: 10px;\r\n  background-color: #4fc3f7;\r\n  color: white;\r\n  cursor: grab;\r\n  margin-bottom: 20px;\r\n}\r\n.dropzone {\r\n  width: 200px;\r\n  height: 150px;\r\n  border: 2px dashed #ccc;\r\n  display: flex;\r\n  align-items: center;\r\n  justify-content: center;\r\n}\r\n<\/code><\/pre>\n<h2 class=\"sc_heading solid blue\"><span class=\"sc_title\">JavaScript\u3067\u30c9\u30e9\u30c3\u30b0\u52d5\u4f5c\u3092\u8ffd\u52a0\u3059\u308b<\/span><\/h2>\n<h3 class=\"sc_heading bborder b blue\"><span class=\"sc_title\">3. \u30a4\u30d9\u30f3\u30c8\u3092\u4f7f\u3063\u3066\u52d5\u304d\u3092\u3064\u3051\u308b<\/span><\/h3>\n<p>JavaScript\u3067\u306f\u3001dragstart, dragover, drop \u30a4\u30d9\u30f3\u30c8\u3092\u4f7f\u3063\u3066\u52d5\u304d\u3092\u5b9f\u88c5\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"line-numbers\"><code class=\"language-javascript\">const dragItem = document.getElementById(\"drag1\");\r\nconst dropZone = document.getElementById(\"dropzone\");\r\ndragItem.addEventListener(\"dragstart\", (e) => {\r\n  e.dataTransfer.setData(\"text\", e.target.id);\r\n});\r\ndropZone.addEventListener(\"dragover\", (e) => {\r\n  e.preventDefault();\r\n});\r\ndropZone.addEventListener(\"drop\", (e) => {\r\n  e.preventDefault();\r\n  const data = e.dataTransfer.getData(\"text\");\r\n  const draggedElement = document.getElementById(data);\r\n  dropZone.appendChild(draggedElement);\r\n});\r\n<\/code><\/pre>\n<h2 class=\"sc_heading solid blue\"><span class=\"sc_title\">\u5fdc\u7528\u30c6\u30af\u30cb\u30c3\u30af\uff1a\u8907\u6570\u30a2\u30a4\u30c6\u30e0\u5bfe\u5fdc\u3084\u30b9\u30bf\u30a4\u30eb\u306e\u5207\u308a\u66ff\u3048<\/span><\/h2>\n<p class=\"codepen\" data-height=\"300\" data-default-tab=\"html,result\" data-slug-hash=\"qEERmQo\" data-pen-title=\"Untitled\" data-user=\"ekwwawpb-the-styleful\" style=\"height: 300px; box-sizing: border-box; display: flex; align-items: center; justify-content: center; border: 2px solid; margin: 1em 0; padding: 1em;\">\n  <span>See the Pen <a href=\"https:\/\/codepen.io\/ekwwawpb-the-styleful\/pen\/qEERmQo\"><br \/>\n  Untitled<\/a> by \u5c0f\u7027\u8ce2 (<a href=\"https:\/\/codepen.io\/ekwwawpb-the-styleful\">@ekwwawpb-the-styleful<\/a>)<br \/>\n  on <a href=\"https:\/\/codepen.io\">CodePen<\/a>.<\/span>\n<\/p>\n<p><script async src=\"https:\/\/public.codepenassets.com\/embed\/index.js\"><\/script><br \/>\n\u8907\u6570\u306e\u30a2\u30a4\u30c6\u30e0\u3092\u30c9\u30e9\u30c3\u30b0\u3057\u305f\u3044\u5834\u5408\u306f\u3001\u30af\u30e9\u30b9\u3092\u5171\u901a\u5316\u3057\u3001\u30a4\u30d9\u30f3\u30c8\u3092\u30eb\u30fc\u30d7\u3067\u8a2d\u5b9a\u3057\u307e\u3059\u3002<\/p>\n<p>\u307e\u305f\u3001\u30c9\u30e9\u30c3\u30b0\u4e2d\u306bCSS\u30af\u30e9\u30b9\u3092\u5207\u308a\u66ff\u3048\u308b\u3068\u3001\u30e6\u30fc\u30b6\u30fc\u306b\u64cd\u4f5c\u4e2d\u3060\u3068\u8996\u899a\u7684\u306b\u4f1d\u3048\u3089\u308c\u307e\u3059\u3002<\/p>\n<h2 class=\"sc_heading solid blue\"><span class=\"sc_title\">\u6ce8\u610f\u70b9\u30fb\u30d6\u30e9\u30a6\u30b6\u5bfe\u5fdc\u306b\u3064\u3044\u3066<\/span><\/h2>\n<div class=\"sc_designlist ul fa_check blue\">\n<ul>\n<li>\u30e2\u30d0\u30a4\u30eb\u7aef\u672b\uff08\u30b9\u30de\u30db\uff09\u3067\u306f\u3001`touchstart` \u3084 `touchmove` \u3092\u4f7f\u3046\u5225\u5b9f\u88c5\u304c\u5fc5\u8981<\/li>\n<li>\u30c9\u30e9\u30c3\u30b0\uff06\u30c9\u30ed\u30c3\u30d7\u306f\u30a2\u30af\u30bb\u30b7\u30d3\u30ea\u30c6\u30a3\u4e0a\u306e\u8ab2\u984c\u304c\u3042\u308b\u305f\u3081\u3001\u4ee3\u66ff\u624b\u6bb5\uff08\u30dc\u30bf\u30f3\u64cd\u4f5c\u306a\u3069\uff09\u3082\u691c\u8a0e\u3059\u308b\u3068\u25ce<\/li>\n<\/ul>\n<\/div>\n<h2 class=\"sc_heading solid blue\"><span class=\"sc_title\">\u307e\u3068\u3081<\/span><\/h2>\n<div class=\"sc_designlist ul fa_check blue\">\n<ul>\n<li>HTML\u30fbCSS\u30fbJavaScript\u3092\u4f7f\u3048\u3070\u3001\u7c21\u5358\u306a\u30c9\u30e9\u30c3\u30b0\uff06\u30c9\u30ed\u30c3\u30d7UI\u306f\u5b9f\u88c5\u53ef\u80fd<\/li>\n<li>drag\u30a4\u30d9\u30f3\u30c8\u306e\u7406\u89e3\u304c\u30ab\u30ae<\/li>\n<li>\u30b9\u30de\u30db\u5bfe\u5fdc\u3084\u30a2\u30af\u30bb\u30b7\u30d3\u30ea\u30c6\u30a3\u306b\u914d\u616e\u3059\u308b\u3068\u3088\u308a\u826f\u3044UI\u306b\u306a\u308b<\/li>\n<\/ul>\n<\/div>\n<p>\u305c\u3072\u3001\u3042\u306a\u305f\u306eWeb\u30b5\u30a4\u30c8\u3084\u30a2\u30d7\u30ea\u306b\u5fdc\u7528\u3057\u3066\u307f\u3066\u304f\u3060\u3055\u3044\uff01<\/p>\n<p>&nbsp;<\/p>\n<p><figure id=\"attachment_475\" aria-describedby=\"caption-attachment-475\" style=\"width: 1500px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/satokotadesign.com\/\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/satokotadesign.com\/blog\/wp-content\/uploads\/2022\/10\/bnr.jpg\" alt=\"\u9759\u5ca1\u770c\u6d5c\u677e\u5e02\u3067\u30db\u30fc\u30e0\u30da\u30fc\u30b8\u5236\u4f5c\u306a\u3089satokotadesign\" width=\"1500\" height=\"500\" class=\"size-full wp-image-475\" srcset=\"https:\/\/satokotadesign.com\/blog\/wp-content\/uploads\/2022\/10\/bnr.jpg 1500w, https:\/\/satokotadesign.com\/blog\/wp-content\/uploads\/2022\/10\/bnr-500x167.jpg 500w, https:\/\/satokotadesign.com\/blog\/wp-content\/uploads\/2022\/10\/bnr-1024x341.jpg 1024w, https:\/\/satokotadesign.com\/blog\/wp-content\/uploads\/2022\/10\/bnr-768x256.jpg 768w\" sizes=\"auto, (max-width: 1500px) 100vw, 1500px\" \/><\/a><figcaption id=\"caption-attachment-475\" class=\"wp-caption-text\"><a href=\"https:\/\/satokotadesign.com\/contact\/\" target=\"_blank\" rel=\"noopener\">\u9759\u5ca1\u770c\u6d5c\u677e\u5e02\u3067\u30db\u30fc\u30e0\u30da\u30fc\u30b8\u5236\u4f5c\u306a\u3089satokotadesign<\/a><\/figcaption><\/figure><\/p>\n\n","protected":false},"excerpt":{"rendered":"<p>\u3053\u3093\u306b\u3061\u306f\uff01\u9759\u5ca1\u770c\u6d5c\u677e\u5e02\u3067WEB\u30c7\u30b6\u30a4\u30ca\u30fc\u3092\u3057\u3066\u3044\u307e\u3059\u5c0f\u7027\u3067\u3059\u3002 \u30c9\u30e9\u30c3\u30b0\uff06\u30c9\u30ed\u30c3\u30d7\u6a5f\u80fd\u3063\u3066\u3001\u3061\u3087\u3063\u3068\u96e3\u3057\u305d\u3046\u306b\u898b\u3048\u307e\u305b\u3093\u304b\uff1f \u3067\u3082\u5b9f\u306f\u3001HTML\u30fbCSS\u30fbJavaScript\u3092\u4f7f\u3048\u3070\u3001\u57fa\u672c\u7684\u306a\u3082\u306e\u306a\u3089\u610f\u5916\u3068\u7c21\u5358\u306b\u4f5c\u308c\u307e\u3059\u3002 \u3053\u306e\u8a18\u4e8b\u3067\u306f\u3001\u2026<\/p>\n","protected":false},"author":1,"featured_media":1337,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[7],"tags":[8],"class_list":["post-1329","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-web","tag-javascript"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/satokotadesign.com\/blog\/wp-json\/wp\/v2\/posts\/1329","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/satokotadesign.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/satokotadesign.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/satokotadesign.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/satokotadesign.com\/blog\/wp-json\/wp\/v2\/comments?post=1329"}],"version-history":[{"count":7,"href":"https:\/\/satokotadesign.com\/blog\/wp-json\/wp\/v2\/posts\/1329\/revisions"}],"predecessor-version":[{"id":1338,"href":"https:\/\/satokotadesign.com\/blog\/wp-json\/wp\/v2\/posts\/1329\/revisions\/1338"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/satokotadesign.com\/blog\/wp-json\/wp\/v2\/media\/1337"}],"wp:attachment":[{"href":"https:\/\/satokotadesign.com\/blog\/wp-json\/wp\/v2\/media?parent=1329"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/satokotadesign.com\/blog\/wp-json\/wp\/v2\/categories?post=1329"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/satokotadesign.com\/blog\/wp-json\/wp\/v2\/tags?post=1329"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}