{"id":26157,"date":"2017-03-14T22:11:20","date_gmt":"2017-03-14T18:41:20","guid":{"rendered":"http:\/\/www.xn--mgbguh09aqiwi.com\/?p=26157"},"modified":"2017-03-14T22:27:18","modified_gmt":"2017-03-14T18:57:18","slug":"%d8%a2%d9%85%d9%88%d8%b2%d8%b4-%d9%be%d8%b3-%d8%b2%d9%85%db%8c%d9%86%d9%87-%d9%85%d8%aa%d8%ad%d8%b1%da%a9-%d8%a8%d9%87-%d8%b5%d9%88%d8%b1%d8%aa-gradient","status":"publish","type":"post","link":"https:\/\/www.xn--mgbguh09aqiwi.com\/%d8%a2%d9%85%d9%88%d8%b2%d8%b4-%d9%be%d8%b3-%d8%b2%d9%85%db%8c%d9%86%d9%87-%d9%85%d8%aa%d8%ad%d8%b1%da%a9-%d8%a8%d9%87-%d8%b5%d9%88%d8%b1%d8%aa-gradient.html","title":{"rendered":"\u0622\u0645\u0648\u0632\u0634 \u067e\u0633 \u0632\u0645\u06cc\u0646\u0647 \u0645\u062a\u062d\u0631\u06a9 \u0628\u0647 \u0635\u0648\u0631\u062a Gradient"},"content":{"rendered":"
\u062f\u0631 \u0627\u06cc\u0646 \u067e\u0633\u062a \u0627\u0632 \u0648\u0628 \u0633\u0627\u06cc\u062a \u0627\u0633\u06a9\u0631\u06cc\u067e\u062a \u062f\u0627\u062a \u06a9\u0627\u0645 \u0642\u0635\u062f \u0622\u0645\u0648\u0632\u0634 \u0627\u06cc\u062c\u0627\u062f \u06cc\u06a9 \u0628\u06a9 \u06af\u0631\u0627\u0646\u062f \u0645\u062a\u062d\u0631\u06a9 \u0628\u0647 \u0635\u0648\u0631\u062a Gradient \u0631\u0627 \u062f\u0627\u0631\u0645 \u06a9\u0647 \u0627\u0645\u06cc\u062f\u0648\u0627\u0631\u0645 \u0645\u0648\u0631\u062f \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0634\u0645\u0627 \u0639\u0632\u06cc\u0632\u0627\u0646 \u0642\u0631\u0627\u0631 \u06af\u06cc\u0631\u062f .<\/p>\n
\u06af\u0631\u0627\u062f\u06cc\u0646\u062a \u0628\u0647 \u0645\u0639\u0646\u0627\u06cc \u0634\u06cc\u0628 \u06cc\u0627 \u0633\u0637\u062d \u0634\u06cc\u0628 \u062f\u0627\u0631 \u0627\u0633\u062a\u060c \u062f\u0631 \u062f\u0646\u06cc\u0627\u06cc \u06af\u0631\u0627\u0641\u06cc\u06a9 \u0628\u0647 \u062a\u0635\u0648\u06cc\u0631\u06cc \u06a9\u0647 \u0627\u0632\u0637\u06cc\u0641 \u0631\u0646\u06af \u0647\u0627\u06cc \u0645\u062e\u062a\u0644\u0641 \u0628\u0647 \u0635\u0648\u0631\u062a \u0634\u06cc\u0628 \u062f\u0627\u0631 \u0627\u06cc\u062c\u0627\u062f \u0645\u06cc \u0634\u0648\u0646\u062f \u0648 \u0645\u0631\u0632 \u0645\u0634\u062e\u0635\u06cc \u0628\u06cc\u0646 \u0631\u0646\u06af \u0647\u0627 \u0646\u0628\u0627\u0634\u062f \u0631\u0627 \u06af\u0631\u0627\u062f\u06cc\u0646\u062a \u0645\u06cc \u06af\u0648\u06cc\u0646\u062f (\u0627\u06cc\u0646 \u0634\u06cc\u0628 \u0647\u0627 \u0645\u06cc \u062a\u0648\u0627\u0646\u0646\u062f \u0639\u0645\u0648\u062f\u06cc\u060c \u0627\u0641\u0642\u06cc \u060c \u0645\u0648\u0631\u0628 \u060c \u0645\u062f\u0648\u0651\u0631 \u0648 \u2026 \u0628\u0627\u0634\u0646\u062f )<\/p>\n
\u0648 \u0627\u0645\u0627 \u0622\u0645\u0648\u0632\u0634 :<\/p>\n \u062f\u0631 \u0627\u0628\u062a\u062f\u0627 \u0628\u0627\u06cc\u062f \u0639\u0631\u0636 \u06a9\u0646\u0645 \u0627\u06cc\u0646 \u0622\u0645\u0648\u0632\u0634 \u0628\u0631 \u0645\u0628\u0646\u0627\u06cc Jquery \u0645\u06cc \u0628\u0627\u0634\u062f . \u067e\u0633 \u0634\u0645\u0627 \u062d\u062a\u0645\u0627 \u0628\u0627\u06cc\u062f \u062f\u0631 \u0648\u0628 \u0633\u0627\u06cc\u062a \u062e\u0648\u062f \u0627\u0632 \u06a9\u062a\u0627\u0628\u062e\u0627\u0646\u0647 \u062c\u06cc \u06a9\u0648\u0626\u0631\u06cc \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0646\u0645\u0627\u06cc\u06cc\u062f .<\/p>\n \u062d\u0627\u0644 \u06a9\u0627\u0641\u06cc\u0633\u062a \u06a9\u062f \u0647\u0627\u06cc \u0627\u0633\u06a9\u0631\u06cc\u067e\u062a\u06cc \u0632\u06cc\u0631 \u0631\u0627 \u0628\u0647 \u0627\u0646\u062a\u0647\u0627\u06cc \u0648\u0628 \u0633\u0627\u06cc\u062a \u062e\u0648\u062f \u0627\u0636\u0627\u0641\u0647 \u0646\u0645\u0627\u06cc\u06cc\u062f :<\/p>\n \u0646\u06a9\u062a\u0647 1 :<\/span> \u0628\u0631\u0627\u06cc \u062a\u063a\u06cc\u06cc\u0631 \u0631\u0646\u06af \u0647\u0627 \u0628\u0647 \u0635\u0648\u0631\u062a RGB \u0645\u06cc\u062a\u0648\u0627\u0646\u06cc\u062f \u0627\u0639\u062f\u0627\u062f\u06cc \u0627\u0632 0 \u062a\u0627 255 \u062f\u0631 \u0645\u0642\u0627\u062f\u06cc\u0631 \u0622\u0631\u0627\u06cc\u0647 colors \u0648\u0627\u0631\u062f \u0646\u0645\u0627\u06cc\u06cc\u062f .<\/p>\n \u0646\u06a9\u062a\u0647 2 :<\/span> \u0628\u0631\u0627\u06cc \u0627\u0641\u0632\u0627\u06cc\u0634 \u06cc\u0627 \u06a9\u0627\u0647\u0634 \u0633\u0631\u0639\u062a \u0645\u06cc\u062a\u0648\u0627\u0646\u06cc\u062f \u0645\u0642\u062f\u0627\u0631 \u0645\u062a\u063a\u06cc\u06cc\u0631 gradientSpeed \u0631\u0627 \u062a\u063a\u06cc\u06cc\u0631 \u062f\u0647\u06cc\u062f .<\/p>\n \u062f\u0645\u0648\u06cc \u0627\u0633\u06a9\u0631\u06cc\u067e\u062a<\/a><\/span><\/p>\n
\n<\/a><\/p>\n<script>\r\nvar colors = new Array(\r\n [62,35,255],\r\n [60,255,60],\r\n [255,35,98],\r\n [45,175,230],\r\n [255,0,255],\r\n [255,128,0]);\r\n\r\nvar step = 0;\r\nvar colorIndices = [0,1,2,3];\r\nvar gradientSpeed = 0.002;\r\n\r\nfunction updateGradient()\r\n{\r\n \r\n if ( $===undefined ) return;\r\n \r\nvar c0_0 = colors[colorIndices[0]];\r\nvar c0_1 = colors[colorIndices[1]];\r\nvar c1_0 = colors[colorIndices[2]];\r\nvar c1_1 = colors[colorIndices[3]];\r\n\r\nvar vms = 1 - step;\r\nvar r1 = Math.round(vms * c0_0[0] + step * c0_1[0]);\r\nvar g1 = Math.round(vms * c0_0[1] + step * c0_1[1]);\r\nvar b1 = Math.round(vms * c0_0[2] + step * c0_1[2]);\r\nvar color1 = \"rgb(\"+r1+\",\"+g1+\",\"+b1+\")\";\r\n\r\nvar r2 = Math.round(vms * c1_0[0] + step * c1_1[0]);\r\nvar g2 = Math.round(vms * c1_0[1] + step * c1_1[1]);\r\nvar b2 = Math.round(vms * c1_0[2] + step * c1_1[2]);\r\nvar color2 = \"rgb(\"+r2+\",\"+g2+\",\"+b2+\")\";\r\n\r\n $('body').css({\r\n background: \"-webkit-gradient(linear, left top, right top, from(\"+color1+\"), to(\"+color2+\"))\"}).css({\r\n background: \"-moz-linear-gradient(left, \"+color1+\" 0%, \"+color2+\" 100%)\"}).css({\r\n background: \"-ms-linear-gradient(left, \"+color1+\" 0%, \"+color2+\" 100%)\"}).css({\r\n background: \"linear-gradient(left, \"+color1+\" 0%, \"+color2+\" 100%)\"}).css({\r\n background: \"-o-linear-gradient(left, \"+color1+\" 0%, \"+color2+\" 100%)\"})\r\n \r\n step += gradientSpeed;\r\n if ( step >= 1 )\r\n {\r\n step %= 1;\r\n colorIndices[0] = colorIndices[1];\r\n colorIndices[2] = colorIndices[3];\r\n colorIndices[1] = ( colorIndices[1] + Math.floor( 1 + Math.random() * (colors.length - 1))) % colors.length;\r\n colorIndices[3] = ( colorIndices[3] + Math.floor( 1 + Math.random() * (colors.length - 1))) % colors.length;\r\n \r\n }\r\n}\r\nsetInterval(updateGradient,1);\r\n<\/script><\/pre>\n