{"id":774,"date":"2014-05-20T02:06:28","date_gmt":"2014-05-19T17:06:28","guid":{"rendered":"http:\/\/www.dream-net.org\/blog\/?p=774"},"modified":"2014-05-20T02:06:28","modified_gmt":"2014-05-19T17:06:28","slug":"input%e3%83%9c%e3%82%bf%e3%83%b3-css%e3%83%87%e3%82%b6%e3%82%a4%e3%83%b3","status":"publish","type":"post","link":"https:\/\/dream-net.org\/blog\/?p=774","title":{"rendered":"input\u30dc\u30bf\u30f3 CSS\u30c7\u30b6\u30a4\u30f3"},"content":{"rendered":"<div id=\"toc_container\" class=\"no_bullets\"><p class=\"toc_title\">Contents<\/p><ul class=\"toc_list\"><li><a href=\"#CSSinputcss\"><span class=\"toc_number toc_depth_1\">1<\/span> \u3010CSS\u3011\u610f\u5916\u3068\u77e5\u3089\u306a\u3044\uff01\uff1finput\u30bf\u30b0\u3092css\u306e\u307f\u3067\u30ab\u30b9\u30bf\u30de\u30a4\u30ba\u3059\u308b\u65b9\u6cd5<\/a><\/li><li><a href=\"#01\"><span class=\"toc_number toc_depth_1\">2<\/span> \u3010\u30d5\u30a9\u30fc\u30e0\u898b\u672c01\u3011<\/a><\/li><li><a href=\"#02\"><span class=\"toc_number toc_depth_1\">3<\/span> \u30d5\u30a9\u30fc\u30e0\u898b\u672c02<\/a><\/li><li><a href=\"#JS\"><span class=\"toc_number toc_depth_1\">4<\/span> \u25c6JS<\/a><\/li><li><a href=\"#CSS\"><span class=\"toc_number toc_depth_1\">5<\/span> \u25c6CSS<\/a><\/li><li><a href=\"#03\"><span class=\"toc_number toc_depth_1\">6<\/span> \u3010\u30d5\u30a9\u30fc\u30e0\u898b\u672c03\u3011<\/a><\/li><li><a href=\"#i\"><span class=\"toc_number toc_depth_1\">7<\/span> \u3010\u30dc\u30bf\u30f3\u898b\u672c\u3011<\/a><\/li><li><a href=\"#i-2\"><span class=\"toc_number toc_depth_1\">8<\/span> \u30c1\u30a7\u30c3\u30af\u30dc\u30c3\u30af\u30b9\u898b\u672c<\/a><\/li><\/ul><\/div>\n<h2 style=\"color: #0083b9; background: #fffd73;\"><span id=\"CSSinputcss\">\u3010CSS\u3011\u610f\u5916\u3068\u77e5\u3089\u306a\u3044\uff01\uff1finput\u30bf\u30b0\u3092css\u306e\u307f\u3067\u30ab\u30b9\u30bf\u30de\u30a4\u30ba\u3059\u308b\u65b9\u6cd5<\/span><\/h2>\n<p>input\u7cfb\u3092css\u3067\u88c5\u98fe\u3057\u305f\u3044\u6642\u306b\u306f\u3001\u300c\u5c5e\u6027\u30bb\u30ec\u30af\u30bf\u300d\u3092\u4f7f\u3046\u3068\u5207\u308a\u5206\u3051\u304c\u4fbf\u5229\u3067\u3059\u3002\u5c5e\u6027\u30bb\u30ec\u30af\u30bf\u306f\u3001\u8981\u7d20\u540d\u306e\u5f8c\u308d\u306b[]\u3092\u8a18\u8ff0\u3057\u3001\u305d\u306e\u4e2d\u3067\u5c5e\u6027\u540d\u3084\u5024\u3092\u6307\u5b9a\u3059\u308b\u3082\u306e\u3067\u3059\u3002<br \/>\n\u4f8b\u3048\u3070\u3001\u4e0b\u8a18\u306e\u3088\u3046\u306a\u8a18\u8ff0\u3092\u3059\u308b\u3068\u3001href\u5c5e\u6027\u3092\u6301\u3064a\u8981\u7d20\u306b\u30b9\u30bf\u30a4\u30eb\u304c\u9069\u7528\u3055\u308c\u307e\u3059\u3002<\/p>\n<p><code><br \/>\na[href]{<br \/>\nfont-size:20px;<br \/>\n}<br \/>\n<\/code><\/p>\n<p>\u3053\u308c\u3092\u5229\u7528\u3057\u3066\u3001input\u8981\u7d20\u306etype\u5c5e\u6027\u306e\u5024\u304ctext\u306e\u6642\u306b\u3060\u3051\u30b9\u30bf\u30a4\u30eb\u3092\u9069\u7528\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n<p><code><br \/>\ninput[type=text]{<br \/>\nwidth:200px;<br \/>\nheight:24px;<br \/>\nline-height:24px;<br \/>\nfont-size:14px;<br \/>\npadding:0 5px 0 5px;<br \/>\n-webkit-box-shadow: 0px 1px rgba(255, 255, 255, 0.5);<br \/>\n-moz-box-shadow: 0px 1px rgba(255, 255, 255, 0.5);<br \/>\nbox-shadow: 0px 1px rgba(255, 255, 255, 0.5);<br \/>\n-webkit-border-radius: 5px;<br \/>\n-moz-border-radius: 5px;<br \/>\nborder-radius: 5px;<br \/>\n}<br \/>\n<\/code><\/p>\n<h2 style=\"color: #0083b9; background: #fffd73;\"><span id=\"01\">\u3010\u30d5\u30a9\u30fc\u30e0\u898b\u672c01\u3011<\/span><\/h2>\n<p>\u30d5\u30a9\u30fc\u30ab\u30b9\u304c\u5f53\u305f\u3063\u305f\u3068\u304d\u3001\u5185\u5074\u306b\u5f71\u3092\u4ed8\u3051\u3066\u307f\u307e\u3059\u3002<\/p>\n<p><code><br \/>\ninput[type=text]:focus{<br \/>\n-moz-box-shadow: inset 1px 4px 9px -6px rgba(0,0,0,0.5);<br \/>\n-webkit-box-shadow: inset 1px 4px 9px -6px rgba(0, 0, 0, 0.5);<br \/>\nbox-shadow: inset 1px 4px 9px -6px rgba(0,0,0,0.5);<br \/>\n}<br \/>\n<\/code><\/p>\n<h2 style=\"color: #0083b9; background: #fffd73;\"><span id=\"02\">\u30d5\u30a9\u30fc\u30e0\u898b\u672c02<\/span><\/h2>\n<p>\u5165\u529b\u3059\u308b\u7b87\u6240\u306b\u3042\u3089\u304b\u3058\u3081\u30c6\u30ad\u30b9\u30c8\u3092\u5165\u308c\u3066\u304a\u304d\u3001\u30d5\u30a9\u30fc\u30ab\u30b9\u304c\u5f53\u305f\u308b\u3068\u6d88\u3059\u3001\u3068\u3044\u3046\u3088\u304f\u3042\u308b\u3042\u306e\u30bf\u30a4\u30d7\u3092\u4f5c\u308b\u306b\u306f\u3001Javascript\u3092\u4f7f\u3044\u307e\u3059\u3002<\/p>\n<p>\u4ee5\u4e0b\u306f\u3001jquery\u3092\u4f7f\u7528\u3057\u305f\u5834\u5408\u306e\u30b9\u30af\u30ea\u30d7\u30c8\u3067\u3059\u3002<\/p>\n<p>JS\u5074\u3067\u6700\u521d\u304b\u3089\u8868\u793a\u3055\u308c\u3066\u3044\u308b\u6587\u5b57\u8272\u3092\u6307\u5b9a\u3057\u3001CSS\u3067\u5b9f\u969b\u306b\u5165\u529b\u3059\u308b\u969b\u306e\u6587\u5b57\u8272\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002<\/p>\n<h2><span id=\"JS\">\u25c6JS<\/span><\/h2>\n<p><code><br \/>\n$(document).ready(function () {<br \/>\n$(\":input[data-watermark]\").each(function () {<br \/>\n$(this).val($(this).attr(\"data-watermark\"));<br \/>\n$(this).bind('focus', function () {<br \/>\nif ($(this).val() == $(this).attr(\"data-watermark\")) $(this).val('');<br \/>\n});<br \/>\n$(this).bind('blur', function () {<br \/>\nif ($(this).val() == '') $(this).val($(this).attr(\"data-watermark\"));<br \/>\n$(this).css('color','#cccccc');\/\/\u3053\u3053\u3067\u6587\u5b57\u8272\u3092\u6307\u5b9a<br \/>\n});<br \/>\n});<br \/>\n});<br \/>\n<\/code><\/p>\n<h2><span id=\"CSS\">\u25c6CSS<\/span><\/h2>\n<p><code><br \/>\ninput[type=text]{<br \/>\ncolor:#000000;<br \/>\n}<br \/>\n<\/code><\/p>\n<h2 style=\"color: #0083b9; background: #fffd73;\"><span id=\"03\">\u3010\u30d5\u30a9\u30fc\u30e0\u898b\u672c03\u3011<\/span><\/h2>\n<p>\u4eca\u5ea6\u306f\u3001\u30dc\u30bf\u30f3\u3092\u30c7\u30b6\u30a4\u30f3\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u3002<br \/>\n\u30dc\u30bf\u30f3\u306e\u5834\u5408\u306f\u3001input[type=button]\u306b\u306a\u308a\u307e\u3059\u3002<br \/>\n\u30dc\u30bf\u30f3\u3089\u3057\u304f\u898b\u305b\u308b\u305f\u3081\u306b\u3001\u80cc\u666f\u3092\u30b0\u30e9\u30c7\u30fc\u30b7\u30e7\u30f3\u306b\u3057\u3066\u8584\u304f\u5f71\u3092\u3064\u3051\u307e\u3057\u305f\u3002<\/p>\n<p><code><br \/>\ninput[type=button]{<br \/>\nbackground-image: -webkit-gradient(linear, left top, left bottom, from(#ddd), to(#aaa));<br \/>\nbackground-image: -webkit-linear-gradient(top, #ddd, #aaa);<br \/>\nbackground-image: -moz-linear-gradient(top, #ddd, #aaa);<br \/>\nbackground-image: -ms-linear-gradient(top, #ddd, #aaa);<br \/>\nbackground-image: -o-linear-gradient(top, #ddd, #aaa);<br \/>\nbackground-image: linear-gradient(top, #ddd, #aaa);<br \/>\nfilter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ddd', endColorstr='#aaa',GradientType=0 ); \/* IE6-9 *\/<br \/>\n}<br \/>\n<\/code><\/p>\n<h2 style=\"color: #0083b9; background: #fffd73;\"><span id=\"i\">\u3010\u30dc\u30bf\u30f3\u898b\u672c\u3011<\/span><\/h2>\n<p>\u30c1\u30a7\u30c3\u30af\u30dc\u30c3\u30af\u30b9\u3084\u30e9\u30b8\u30aa\u30dc\u30bf\u30f3\u3082\u3001css\u306e\u307f\u3067\u30ab\u30b9\u30bf\u30de\u30a4\u30ba\u3067\u304d\u307e\u3059\u3002<br \/>\n\u3053\u3061\u3089\u306e\u30da\u30fc\u30b8\u3067\u7d39\u4ecb\u3055\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n<p><a href=\"http:\/\/www.inserthtml.com\/2012\/06\/custom-form-radio-checkbox\/\" target=\"_blank\">\u21d2inserthtml<\/p>\n<p><\/a><a href=\"http:\/\/www.dream-net.org\/blog\/wp-content\/uploads\/2014\/05\/017.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-777\" title=\"01\" src=\"http:\/\/www.dream-net.org\/blog\/wp-content\/uploads\/2014\/05\/017.jpg\" alt=\"\" width=\"480\" height=\"360\" srcset=\"https:\/\/dream-net.org\/blog\/wp-content\/uploads\/2014\/05\/017.jpg 480w, https:\/\/dream-net.org\/blog\/wp-content\/uploads\/2014\/05\/017-300x225.jpg 300w\" sizes=\"auto, (max-width: 480px) 100vw, 480px\" \/><\/a><\/p>\n<p>\u30c1\u30a7\u30c3\u30af\u30dc\u30c3\u30af\u30b9\u81ea\u4f53\u306fdisplay:none\u3067\u6d88\u3057\u3066\u3057\u307e\u3044\u3001label\u306bcss\u3092\u9069\u7528\u3057\u307e\u3059\u3002<\/p>\n<h2 style=\"color: #0083b9; background: #fffd73;\"><span id=\"i-2\">\u30c1\u30a7\u30c3\u30af\u30dc\u30c3\u30af\u30b9\u898b\u672c<\/span><\/h2>\n<p>\u3053\u3046\u3057\u3066\u307f\u308b\u3068\u3001css\u306e\u307f\u3067\u8272\u3093\u306a\u30c7\u30b6\u30a4\u30f3\u306e\u30d5\u30a9\u30fc\u30e0\u304c\u4f5c\u308c\u305d\u3046\u3067\u3059\u306d\u3002<br \/>\n\u3053\u308c\u307e\u3067Javascript\u3092\u4f7f\u3063\u3066\u3044\u305f\u4eba\u3082\u3001css\u3060\u3051\u3067\u30ab\u30b9\u30bf\u30de\u30a4\u30ba\u3067\u304d\u306a\u3044\u304b\u3001\u4e00\u5ea6\u898b\u76f4\u3057\u3066\u307f\u3066\u306f\u3044\u304b\u304c\u3067\u3057\u3087\u3046\u304b\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Contents1 \u3010CSS\u3011\u610f\u5916\u3068\u77e5\u3089\u306a\u3044\uff01\uff1finput\u30bf\u30b0\u3092css\u306e\u307f\u3067\u30ab\u30b9\u30bf\u30de\u30a4\u30ba\u3059\u308b\u65b9\u6cd52 \u3010\u30d5\u30a9\u30fc\u30e0\u898b\u672c01\u30113 \u30d5\u30a9\u30fc\u30e0\u898b\u672c024 \u25c6JS5 \u25c6CSS6 \u3010\u30d5\u30a9\u30fc\u30e0\u898b\u672c03\u30117 \u3010\u30dc\u30bf\u30f3\u898b\u672c\u30118 \u30c1\u30a7\u30c3\u30af\u30dc\u30c3 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":776,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[50,45],"tags":[],"class_list":["post-774","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\/774","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=774"}],"version-history":[{"count":3,"href":"https:\/\/dream-net.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/774\/revisions"}],"predecessor-version":[{"id":780,"href":"https:\/\/dream-net.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/774\/revisions\/780"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/dream-net.org\/blog\/index.php?rest_route=\/wp\/v2\/media\/776"}],"wp:attachment":[{"href":"https:\/\/dream-net.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=774"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dream-net.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=774"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dream-net.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=774"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}