利用純html5繪制出來(lái)的一款非常漂亮的時(shí)鐘
來(lái)源:易賢網(wǎng) 閱讀:1426 次 日期:2015-03-17 11:06:27
溫馨提示:易賢網(wǎng)小編為您整理了“利用純html5繪制出來(lái)的一款非常漂亮的時(shí)鐘”,方便廣大網(wǎng)友查閱!

今天給大家分享一款非常漂亮的純html5實(shí)現(xiàn)的時(shí)鐘。整個(gè)界面都由html5繪制而成。一起看下效果圖:

實(shí)現(xiàn)的代碼。

名單

htm代碼:

XML/HTML Code復(fù)制內(nèi)容到剪貼板

<div class="container">

<svg width="600" height="600" class='svg-element'>

<filter id="f4" x="-50%" y="-20%" width="200%" height="140%">

<feOffset result="offOut" in="SourceAlpha" dx="0" dy="25" />

<feGaussianBlur result="blurOut" in="offOut" stdDeviation="10" />

<feBlend in="SourceGraphic" in2="blurOut" mode="normal" />

</filter>

<filter id="blurred-source" x="-50%" y="-20%" width="200%" height="140%">

<feGaussianBlur in="color" stdDeviation="5" result="blurOut"/>

</filter>

<filter id="inset-shadow">

<feOffset dx="0" dy="10"/> <!-- Shadow Offset -->

<feGaussianBlur stdDeviation="15" result="offset-blur"/> <!-- Shadow Blur -->

<feComposite operator="out" in="SourceGraphic" in2="offset-blur" result="inverse"/> <!-- Invert the drop shadow to create an inner shadow -->

<feFlood flood-color="black" flood-opacity="1" result="color"/> <!-- Color & Opacity -->

<feComposite operator="in" in="color" in2="inverse" result="shadow"/> <!-- Clip color inside shadow -->

<feComponentTransfer in="shadow" result="shadow"> <!-- Shadow Opacity -->

<feFuncA type="linear" slope="1"/>

</feComponentTransfer>

<feComposite operator="over" in="shadow" in2="SourceGraphic"/> <!-- Put shadow over original object -->

</filter>

<filter id="inset-shadow-big">

<feOffset dx="0" dy="4"/> <!-- Shadow Offset -->

<feGaussianBlur stdDeviation="2" result="offset-blur"/> <!-- Shadow Blur -->

<feComposite operator="out" in="SourceGraphic" in2="offset-blur" result="inverse"/> <!-- Invert the drop shadow to create an inner shadow -->

<feFlood flood-color="white" flood-opacity="1" result="color"/> <!-- Color & Opacity -->

<feComposite operator="in" in="color" in2="inverse" result="shadow"/> <!-- Clip color inside shadow -->

<feComponentTransfer in="shadow" result="shadow"> <!-- Shadow Opacity -->

<feFuncA type="linear" slope="0.5"/>

</feComponentTransfer>

<feComposite operator="over" in="shadow" in2="SourceGraphic"/> <!-- Put shadow over original object -->

</filter>

<filter id="inset-shadow-big-bottom">

<feOffset dx="0" dy="10"/> <!-- Shadow Offset -->

<feGaussianBlur stdDeviation="2" result="offset-blur"/> <!-- Shadow Blur -->

<feComposite operator="out" in="SourceGraphic" in2="offset-blur" result="inverse"/> <!-- Invert the drop shadow to create an inner shadow -->

<feFlood flood-color="#FFF" flood-opacity="1" result="color"/> <!-- Color & Opacity -->

<feComposite operator="in" in="color" in2="inverse" result="shadow"/> <!-- Clip color inside shadow -->

<feComponentTransfer in="shadow" result="shadow"> <!-- Shadow Opacity -->

<feFuncA type="linear" slope="0.5"/>

</feComponentTransfer>

<feComposite operator="over" in="shadow" in2="SourceGraphic" result='final-shadow-1'/> <!-- Put shadow over original object -->

<feOffset dx="0" dy="-12"/> <!-- Shadow Offset -->

<feGaussianBlur stdDeviation="2" result="offset-blur"/> <!-- Shadow Blur -->

<feComposite operator="out" in="final-shadow-1" in2="offset-blur" result="inverse"/> <!-- Invert the drop shadow to create an inner shadow -->

<feFlood flood-color="#69c39b" flood-opacity="1" result="color"/> <!-- Color & Opacity -->

<feComposite operator="in" in="color" in2="inverse" result="shadow"/> <!-- Clip color inside shadow -->

<feComponentTransfer in="shadow" result="shadow"> <!-- Shadow Opacity -->

<feFuncA type="linear" slope="0.5"/>

</feComponentTransfer>

<feComposite operator="over" in="shadow" in2="final-shadow-1" result='final-shadow-2'/> <!-- Put shadow over original object -->

</filter>

<linearGradient id="LG"

gradientTransform="rotate(90 .5 .5)">

<stop id="s0" offset="0" stop-color="#d6f8e9"/>

<stop id="s2" offset="1" stop-color="#9ee1c4"/>

</linearGradient>

<linearGradient id="LG2"

gradientTransform="rotate(-90 .5 .5)">

<stop id="s0" offset="0.07" stop-color="#fdfefe"/>

<stop id="s1" offset="0.5" stop-color="#98e2c2"/>

<stop id="s2" offset="0.8" stop-color="#79c9a7"/>

<stop id="s3" offset="1" stop-color="#5fbc95"/>

</linearGradient>

<linearGradient id="arrow1"

gradientTransform="rotate(-90 .5 .5)">

<stop id="s0" offset="0" stop-color="#07594f"/>

<stop id="s2" offset="1" stop-color="#01443c"/>

</linearGradient>

<linearGradient id="arrowRed"

gradientTransform="rotate(-90 .5 .5)">

<stop id="s0" offset="0" stop-color="#fd5959"/>

<stop id="s2" offset="1" stop-color="#fe7c7c"/>

</linearGradient>

<linearGradient id="center-knob-outter"

gradientTransform="rotate(90 .5 .5)">

<stop id="s0" offset="0" stop-color="#fffefe"/>

<stop id="s2" offset="1" stop-color="#86ecdb"/>

</linearGradient>

<linearGradient id="center-knob-inner"

gradientTransform="rotate(90 .5 .5)">

<stop id="s0" offset="0" stop-color="#a0dcd2"/>

<stop id="s2" offset="1" stop-color="#dff9ef"/>

</linearGradient>

<g transform="translate(50, 20)">

<rect x="0" y="0"

width="382" height="382"

fill="url(#LG)"

filter="url(#inset-shadow-big-bottom)"

rx="75" ry="105" />

<circle cx="191" cy="191" r="155" fill="url(#LG2)"/>

<circle cx="191" cy="191" r="130" fill="#53d2c5"/>

<circle cx="191" cy="191" r="130" fill="#53d2c5" filter="url(#inset-shadow)" />

<g width="200" height="200"

transform="translate(100, 100)">

<animateTransform attributeName="transform" type="translate" dur="4s"

values="191,191;191,191" repeatCount="indefinite"/>

<animateTransform attributeName="transform" additive="sum" type="rotate"

dur="86400s" values="200, 0 0;550 0 0" repeatCount="indefinite"/>

<rect x="0" y="0"

width="22" height="70"

fill="url(#arrow1)"

fill-opacity="0.5"

filter="url(#blurred-source)"

rx="10" ry="10"

transform="translate(-11, -15)" />

</g>

<g width="200" height="200"

transform="translate(100, 100)">

<animateTransform attributeName="transform" type="translate" dur="4s"

values="191,191;191,191" repeatCount="indefinite"/>

<animateTransform attributeName="transform" additive="sum" type="rotate"

dur="86400s" values="200, 0 0;550 0 0" repeatCount="indefinite"/>

<rect x="0" y="0"

width="20" height="70"

fill="url(#arrow1)"

rx="10" ry="10"

transform="translate(-10, -10)" />

</g>

<g width="200" height="200"

transform="translate(100, 100)">

<animateTransform attributeName="transform" type="translate" dur="4s"

values="191,191;191,191" repeatCount="indefinite"/>

<animateTransform attributeName="transform" additive="sum" type="rotate"

dur="3600s" values="90,0 0;450 0 0" repeatCount="indefinite"/>

<rect x="0" y="0"

width="18" height="104"

fill="url(#arrow1)"

fill-opacity="0.8"

filter="url(#blurred-source)"

rx="8" ry="8"

transform="translate(-9, -15)"> />

</g>

<g width="200" height="200"

transform="translate(100, 100)">

<animateTransform attributeName="transform" type="translate" dur="4s"

values="191,191;191,191" repeatCount="indefinite"/>

<animateTransform attributeName="transform" additive="sum" type="rotate"

dur="3600s" values="90,0 0;450 0 0" repeatCount="indefinite"/>

<rect x="0" y="0"

width="16" height="104"

fill="url(#arrow1)"

rx="8" ry="8"

transform="translate(-8, -8)"> />

</g>

<g width="200" height="200">

<animateTransform attributeName="transform" type="translate" dur="4s"

values="195,195;190,195" repeatCount="indefinite"/>

<animateTransform attributeName="transform" additive="sum" type="rotate"

dur="60s" values="0,0 0;360 0 0" repeatCount="indefinite"/>

<rect class="arrowRed"

x="0" y="0"

width="8" height="120"

fill="url(#arrowRed)"

filter="url(#blurred-source)"

fill-opacity="0.5"

rx="3" ry="3"

transform="translate(-3, -20)"/>

</g>

<g width="200" height="200"

transform="translate(100, 100)">

<animateTransform attributeName="transform" type="translate" dur="4s"

values="191,191;191,191" repeatCount="indefinite"/>

<animateTransform attributeName="transform" additive="sum" type="rotate"

dur="60s" values="0,0 0;360 0 0" repeatCount="indefinite"/>

<rect class="arrowRed"

x="0" y="0"

width="6" height="134"

fill="url(#arrowRed)"

rx="3" ry="3"

transform="translate(-3, -20)"/>

</g>

<g width="200" height="200"

transform="translate(191, 191)">

<circle cx="0" cy="0" r="19" fill="url(#center-knob-outter)"/>

<circle cx="0" cy="0" r="10" fill="url(#center-knob-inner)"/>

</g>

<!-- <path d="M 200 20

200 40

180 30 z">-->

</g>

</div>

css3代碼:

CSS Code復(fù)制內(nèi)容到剪貼板

.container

{

text-align: center;

width: 100%;

margin-top: 20px;

padding: 20px;

}

更多信息請(qǐng)查看IT技術(shù)專(zhuān)欄

更多信息請(qǐng)查看網(wǎng)頁(yè)制作
易賢網(wǎng)手機(jī)網(wǎng)站地址:利用純html5繪制出來(lái)的一款非常漂亮的時(shí)鐘
由于各方面情況的不斷調(diào)整與變化,易賢網(wǎng)提供的所有考試信息和咨詢(xún)回復(fù)僅供參考,敬請(qǐng)考生以權(quán)威部門(mén)公布的正式信息和咨詢(xún)?yōu)闇?zhǔn)!
相關(guān)閱讀網(wǎng)頁(yè)制作

2025國(guó)考·省考課程試聽(tīng)報(bào)名

  • 報(bào)班類(lèi)型
  • 姓名
  • 手機(jī)號(hào)
  • 驗(yàn)證碼
關(guān)于我們 | 聯(lián)系我們 | 人才招聘 | 網(wǎng)站聲明 | 網(wǎng)站幫助 | 非正式的簡(jiǎn)要咨詢(xún) | 簡(jiǎn)要咨詢(xún)須知 | 加入群交流 | 手機(jī)站點(diǎn) | 投訴建議
工業(yè)和信息化部備案號(hào):滇ICP備2023014141號(hào)-1 云南省教育廳備案號(hào):云教ICP備0901021 滇公網(wǎng)安備53010202001879號(hào) 人力資源服務(wù)許可證:(云)人服證字(2023)第0102001523號(hào)
云南網(wǎng)警備案專(zhuān)用圖標(biāo)
聯(lián)系電話(huà):0871-65099533/13759567129 獲取招聘考試信息及咨詢(xún)關(guān)注公眾號(hào):hfpxwx
咨詢(xún)QQ:526150442(9:00—18:00)版權(quán)所有:易賢網(wǎng)
云南網(wǎng)警報(bào)警專(zhuān)用圖標(biāo)