HTML preprocessors can make writing HTML more powerful or convenient. For instance, Markdown is designed to be easier to write and read for text documents and you could write a loop in Pug.
In CodePen, whatever you write in the HTML editor is what goes within the <body>
tags in a basic HTML5 template. So you don't have access to higher-up elements like the <html>
tag. If you want to add classes there that can affect the whole document, this is the place to do it.
In CodePen, whatever you write in the HTML editor is what goes within the <body>
tags in a basic HTML5 template. If you need things in the <head>
of the document, put that code here.
The resource you are linking to is using the 'http' protocol, which may not work when the browser is using https.
CSS preprocessors help make authoring CSS easier. All of them offer things like variables and mixins to provide convenient abstractions.
It's a common practice to apply CSS to a page that styles elements such that they are consistent across all browsers. We offer two of the most popular choices: normalize.css and a reset. Or, choose Neither and nothing will be applied.
To get the best cross-browser support, it is a common practice to apply vendor prefixes to CSS properties and values that require them to work. For instance -webkit-
or -moz-
.
We offer two popular choices: Autoprefixer (which processes your CSS server-side) and -prefix-free (which applies prefixes via a script, client-side).
Any URLs added here will be added as <link>
s in order, and before the CSS in the editor. You can use the CSS from another Pen by using its URL and the proper URL extension.
You can apply CSS to your Pen from any stylesheet on the web. Just put a URL to it here and we'll apply it, in the order you have them, before the CSS in the Pen itself.
You can also link to another Pen here (use the .css
URL Extension) and we'll pull the CSS from that Pen and include it. If it's using a matching preprocessor, use the appropriate URL Extension and we'll combine the code before preprocessing, so you can use the linked Pen as a true dependency.
JavaScript preprocessors can help make authoring JavaScript easier and more convenient.
Babel includes JSX processing.
Any URL's added here will be added as <script>
s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.
You can apply a script from anywhere on the web to your Pen. Just put a URL to it here and we'll add it, in the order you have them, before the JavaScript in the Pen itself.
If the script you link to has the file extension of a preprocessor, we'll attempt to process it before applying.
You can also link to another Pen here, and we'll pull the JavaScript from that Pen and include it. If it's using a matching preprocessor, we'll combine the code before preprocessing, so you can use the linked Pen as a true dependency.
Search for and use JavaScript packages from npm here. By selecting a package, an import
statement will be added to the top of the JavaScript editor for this package.
Using packages here is powered by Skypack, which makes packages from npm not only available on a CDN, but prepares them for native JavaScript ES6 import
usage.
All packages are different, so refer to their docs for how they work.
If you're using React / ReactDOM, make sure to turn on Babel for the JSX processing.
If active, Pens will autosave every 30 seconds after being saved once.
If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.
If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.
Visit your global Editor Settings.
body
.mute_btn Mute Sound
div.container-fluid.toggle_bk_0
//audio(src="http://dyverse.studio/backmusic/Layer%201.mp3" autoplay loop)
.row.row_black.row_index
canvas#background_index
.index_center
svg(xmlns='http://www.w3.org/2000/svg', id='icon', viewbox='0 0 82.28 77.35')
defs
style.
.cls-1,.cls-2,.cls-3{fill:none;stroke:#c9a063;stroke-linejoin:round;}.cls-1,.cls-2{stroke-linecap:round;}.cls-1{stroke-linejoin:round;}.cls-2,.cls-3{stroke-miterlimit:10;}.cls-3{stroke-width:0.2px;}
clipPath(id="cut-off-bottom")
path(d='M14.63,59.53A24.16,24.16,0,1,0,27.86,13.05' style="transform: scale(1.1) translateX(-3px) translateY(-3px);")
g(clip-path="url(#cut-off-bottom)").cd_wave
g.cd_in
path#mainhalfcir.cls-1(d='M14.63,59.53A24.16,24.16,0,1,0,27.86,13.05Z')
path.cls-2(d='M27.4,37.93a6.44,6.44,0,0,1-8,4.43l1.76-6.19L23,30A6.44,6.44,0,0,1,27.4,37.93Z')
g.playline(clip-path="url(#cut-off-bottom)")
circle.cls-2(cx="0" cy="0" r="10")
g.pointerb
line.cls-1(x1='61.13', y1='59.53', x2='52.62', y2='36.76')
g.pointer
path.cls-2(d='M52.62 36.76 33.31 36.76')
line.cls-1(x1='33.31', y1='34.22', x2='33.31', y2='39.3')
path.drawing.cls-2(d='M70.86 25.35 67.74 36.29 61.13 59.53 ')
line.cls-1(x1='73.4', y1='25.35', x2='68.31', y2='25.35')
line.cls-1(x1='63.33', y1='59.53', x2='58.25', y2='59.53')
path.cls-3(d='M26.3,18.52a24.27,24.27,0,0,0-4.19-1.63L8.88,63.36A24.14,24.14,0,0,0,31.64,58.1')
.title.blingtext DYVERSE x STUDIO
.title.title2.blingtext 歧響音樂
.span_100vh.toggle_bk_1
.row.row_yellow.row_about
canvas#background_intro
div.container-fluid.min_div
.col-sm-4
.v_center
h1 About
h2 岐響-延展真實世界的無限可能
p.maintexts 創立於2016 年,承襲多元的音樂風格,<br>利用真實採樣、數位編輯及後製技術,<br>延展音樂的無限可能,使每一個作品<br>成為獨一無二的聽覺饗宴。
//- .row.row_black.row_service
.row.row_white.row_service
.container-fluid.min_div
.col-sm-12
h1 Service
.col-sm-12.col_service
.col-sm-3
svg#service_1.sv_icon.sv_icon1(data-name='圖層 1', xmlns='http://www.w3.org/2000/svg', viewbox='0 0 93.14 93.85')
defs
style.
.s1cls-1,.s1cls-2{fill:none;}.s1cls-1,.s1cls-2,.s1cls-3,.s1cls-5,.s1cls-6{stroke:#c9a063;}.s1cls-1,.s1cls-2,.s1cls-3,.s1cls-4,.s1cls-5{stroke-miterlimit:10;}.s1cls-1,.s1cls-3,.s1cls-6{stroke-width:1.5px;}.s1cls-4,.s1cls-5,.s1cls-6{fill:#eee;}.s1cls-3{fill:#c9a063;stroke:#eee;}
title 網站設計
rect.s1cls-1(x='7.49', y='28.25', width='41.49', height='53.25')
line.s1line.s1cls-2(x1='11.65', y1='45.74', x2='43.18', y2='45.74')
line.s1line.s1cls-2(x1='11.65', y1='50.59', x2='43.18', y2='50.59')
line.s1line.s1cls-2(x1='11.65', y1='55.43', x2='43.18', y2='55.43')
line.s1line.s1cls-2(x1='11.65', y1='60.28', x2='43.18', y2='60.28')
line.s1line.s1cls-2(x1='11.65', y1='65.12', x2='43.18', y2='65.12')
line.s1line.s1cls-2(x1='14.42', y1='69.97', x2='45.95', y2='69.97')
circle#s1bc.s1cls-3(cx='53.83', cy='44.16', r='31.82')
circle#s1mc.s1cls-4(cx='53.83', cy='44.62', r='11.73')
circle#s1sc.s1cls-5(cx='53.83', cy='44.62', r='3.56')
polygon#s1playbtn.s1cls-6(points='66.88 62.69 66.88 79.34 82.32 71.02 66.88 62.69')
h2 配樂與編曲
p.maintexts 原創音樂,Demo 製作,廣告、影視與遊戲配樂,編曲與樂曲重製
.col-sm-3
//- img.sv_icon.sv_icon2(src="http://dyverse.studio/img/service_2.svg")
svg.sv_icon.sv_icon2#service_2(data-name='圖層 1', xmlns='http://www.w3.org/2000/svg', viewbox='0 0 93.14 93.85')
defs
style.
.s2cls-1,.s2cls-5{fill:none;}.s2cls-1,.s2cls-3,.s2cls-5{stroke:#c9a063;}.s2cls-1,.s2cls-3,.s2cls-4,.s2cls-5{stroke-miterlimit:10;}.s2cls-1{stroke-width:1.5px;}.s2cls-2,.s2cls-4{fill:#c9a063;}.s2cls-3{fill:#eee;}.s2cls-4{stroke:#eee;}
title 網站設計
g#s2all
rect.s2cls-1(x='12.37', y='43.64', width='64.51', height='39.21')
g#s2boardtop
polygon.s2cls-1(points='74.4 22.98 13.19 43.64 9.86 32.87 71.08 12.21 74.4 22.98')
polygon.s2cls-2(points='16.04 30.79 22.23 40.59 29.4 38.17 23.37 28.31 16.04 30.79')
polygon.s2cls-2(points='30.82 25.8 37.01 35.6 44.17 33.19 38.14 23.33 30.82 25.8')
polygon.s2cls-2(points='45.05 21 51.24 30.8 58.41 28.38 52.38 18.52 45.05 21')
polygon.s2cls-2(points='59.83 16.01 66.02 25.81 73.18 23.4 67.15 13.54 59.83 16.01')
circle#s2cir1.s2cls-3(cx='30.77', cy='63.55', r='7.85')
circle#s2cir2.s2cls-4(cx='30.77', cy='63.55', r='3.91')
circle#s2cir3.s2cls-4(cx='57.88', cy='63.55', r='3.91')
polygon#s2musicbomb.s2cls-2(points='70.08 59 74.4 47.53 85.23 50.06 77.88 43.92 85.23 30.88 72.6 39.74 67.92 30.4 65.89 41.6 53.39 39.98 62.84 47.38 59.83 58.57 67.92 51.35 70.08 59')
line.s2cls-5(x1='12.37', y1='48.03', x2='76.88', y2='48.03')
h2 音效製作
p.maintexts LOGO 與企業形象音效,廣告、影視與遊戲音效,網站特效音,手機鈴聲
.col-sm-3
//- img.sv_icon.sv_icon3(src="http://dyverse.studio/img/service_3.svg")
svg.sv_icon.sv_icon3#service_3(data-name='圖層 1', xmlns='http://www.w3.org/2000/svg', viewbox='0 0 93.14 93.85')
defs
style.
.s3cls-1,.s3cls-2{fill:none;stroke:#c9a063;stroke-miterlimit:10;}.s3cls-1{stroke-width:1.5px;}.s3cls-3{fill:#c9a063;}
title 網站設計
rect.s3cls-1(x='11.34', y='12.34', width='62.88', height='8.77')
rect.s3cls-1(x='24', y='27.61', width='62.88', height='8.77')
rect.s3cls-1(x='6.26', y='43.57', width='62.88', height='8.77')
rect.s3cls-1(x='17.55', y='59.07', width='62.88', height='8.77')
rect.s3cls-1(x='17.55', y='74.41', width='62.88', height='8.77')
line.s3cls-2(x1='27.86', y1='9.72', x2='27.86', y2='87.12')
line.s3cls-2(x1='65.99', y1='6.72', x2='65.99', y2='84.12')
rect.s3cls-3(x='27.86', y='27.95', width='21.12', height='8.77')
rect.s3cls-3(x='65.99', y='59.07', width='14.43', height='8.77')
rect.s3cls-3(x='35.84', y='74.41', width='14.95', height='8.77')
rect.s3cls-3(x='39.83', y='43.57', width='5.73', height='8.77')
rect.s3cls-3(x='55.44', y='12.13', width='10.56', height='8.2')
g#s3per1
polygon.s3cls-3(points='30.49 12.23 28.23 21.21 29.43 21.21 31.82 12.23 30.49 12.23')
polygon.s3cls-3(points='33.01 12.23 30.75 21.21 31.95 21.21 34.34 12.23 33.01 12.23')
polygon.s3cls-3(points='35.72 12.23 33.46 21.21 34.66 21.21 37.05 12.23 35.72 12.23')
polygon.s3cls-3(points='38.24 12.23 35.99 21.21 37.18 21.21 39.57 12.23 38.24 12.23')
g#s3per2
polygon.s3cls-3(points='56.05 58.97 53.8 67.95 54.99 67.95 57.38 58.97 56.05 58.97')
polygon.s3cls-3(points='58.58 58.97 56.32 67.95 57.52 67.95 59.91 58.97 58.58 58.97')
polygon.s3cls-3(points='61.29 58.97 59.03 67.95 60.22 67.95 62.62 58.97 61.29 58.97')
polygon.s3cls-3(points='63.81 58.97 61.55 67.95 62.75 67.95 65.14 58.97 63.81 58.97')
polygon.s3cls-3(points='45.57 58.97 43.31 67.95 44.51 67.95 46.9 58.97 45.57 58.97')
polygon.s3cls-3(points='48.1 58.97 45.84 67.95 47.03 67.95 49.43 58.97 48.1 58.97')
polygon.s3cls-3(points='50.8 58.97 48.55 67.95 49.74 67.95 52.13 58.97 50.8 58.97')
polygon.s3cls-3(points='53.33 58.97 51.07 67.95 52.27 67.95 54.66 58.97 53.33 58.97')
h2 混音後製
p.maintexts 歌手與樂手錄音,旁白錄製,音樂會現場錄音,後製編輯,混音與母帶處理
.col-sm-3
svg#service_4.sv_icon.sv_icon4(data-name='圖層 1', xmlns='http://www.w3.org/2000/svg', viewbox='0 0 93.14 93.85')
defs
style.
.s4cls-1,.s4cls-2{fill:none;stroke:#c9a063;stroke-miterlimit:10;}.s4cls-1{stroke-width:1.5px;}.s4cls-3{fill:#c9a063;}
clipPath#cutscreen
rect.s4cls-2(x='20.35', y='19.61', width='52.44', height='40.26')
title 網站設計
rect.s4cls-1(x='9.57', y='13.16', width='73.99', height='53.17')
rect.s4cls-2(x='20.35', y='19.61', width='52.44', height='40.26')
rect.s4cls-3(x='35.78', y='77.18', width='21.58', height='6.47')
rect.s4cls-3(x='45.04', y='66.33', width='3.06', height='11.06')
line.s4cls-2(x1='20.35', y1='26.92', x2='72.79', y2='26.92')
line.s4cls-2(x1='20.35', y1='33.1', x2='72.79', y2='33.1')
line.s4cls-2(x1='20.35', y1='39.28', x2='72.79', y2='39.28')
line.s4cls-2(x1='20.35', y1='45.46', x2='72.79', y2='45.46')
line.s4cls-2(x1='20.35', y1='51.64', x2='72.79', y2='51.64')
g(clip-path="url(#cutscreen)")
circle#score_cir1.s4cls-3(cx='28.76', cy='26.72', r='3.07')
circle#score_cir2.s4cls-3(cx='37.91', cy='39.28', r='3.07')
circle#score_cir3.s4cls-3(cx='52.14', cy='33.1', r='3.07')
circle#score_cir4.s4cls-3(cx='64.96', cy='51.64', r='3.07')
//- img.sv_icon.sv_icon4(src="http://dyverse.studio/img/service_4.svg")
h2 數位製譜
p.maintexts 樂譜電子檔製作,流行音樂、樂團譜製作,現代音樂、室內樂、交響樂總譜與分譜打印
.row.row_black.row_works.toggle_bk_2
.container-fluid.min_div
.col-sm-12
h1 Works
.col-sm-12.col_tracks
.tracks#mainapp.container_fluid
.alltrack.container_fluid
.track(v-for="track in tracks" title="點擊前往soundcloud查看 {{track.title}} 系列作品")
.track_job ({{track.job}})
.track_title {{track.title}}
.track_description {{track.cooperation}}
.row.row_yellow.row_projects.toggle_bk_3
.container-fluid.min_div
.col-sm-12
h1 Projects
.col-sm-12.projs
.col-sm-12.proj
.col-sm-12.video_container
iframe.mainvideo(src="https://www.youtube.com/embed/WFaxF7Xsmyo" frameborder="0" width="100%" height="300px" allowfullscreen)
.col-sm-4.people_pic
img(src="https://scontent-lhr3-1.xx.fbcdn.net/v/t1.0-1/p320x320/13567147_1712503615638623_6907762446740795206_n.jpg?oh=53ce691f15598ab8bbfb970de17c3046&oe=582EAD2F")
h2.title Akira
p.maintexts 台灣彰化縣出身,忠實LoveLive愛好者,也因為μ's而有契機與團隊成員相遇。愛好是唱歌和放空,希望能藉著歌曲為大家帶來笑容。
.col-sm-8.introduction
h2.title Love Live-Medley
p.maintexts Akira的第一個作品終於和大家見面了喔喔喔!!!<br>由Akira用她獨特的方式詮釋她最愛的LoveLive組曲<br>「叶え、私たちの夢!」<br>謝謝18位女神讓我們看到的一切。<br>妳們所帶給我們的奇蹟,是我們一生的寶物。<br>μ's六週年生日快樂
.col-sm-12.proj
.col-sm-12.video_container
video.mainvideo(title="Coming soon!")
.col-sm-4.people_pic
img(src="http://dyverse.studio/img/Sato.jpg")
h2.title 佐藤 Sato
p.maintexts 嚮往著愛與勇氣<br>從家鄉魔界逃離來到人間界的屬性不明生物(?<br>以從事藝能活動來達到外交及傳遞幸福和希望的目的<br>希望能夠促進魔界和人間界的友好和合諧相處 ♥<br>不過有時說的是家鄉魔界的語言和文法<br>所以有時可能會和人類對不上拍(?<br>關於人類的一切不管是語言或是生活方式都還在學習中!
.col-sm-8.introduction
h2.title 敬請期待
p.maintexts 敬請期待
.row.row_white.row_contact
canvas#background_contact
.container-fluid.min_div
.col-sm-12
h1 Contact
.col-sm-12
.col-sm-2.col-lg-3
form.col-sm-8.col-lg-6.contactform
.fields.col-sm-12
h3 姓名
input(id="reg_name")
h3 聯絡信箱
input(id="reg_email")
h3 聯絡電話
input(id="reg_phone")
h3 委託內容
textarea(id="reg_content")
.submitbtn 送出
.col-sm-2.col-lg-3
footer.row.row_black.row_footer
div.container-fluid.min_div
.col-sm-12
.centerbox
img.icon_sm(src="http://dyverse.studio/img/icon-02.svg")
| Dyverse Studio 岐響音樂- [email protected]
//h1 Footer
//color settings
$color_yellow: #c9a063
$color_black: #241e1c
$color_white: #eee
//break settings
$break_big: 1000px
$break_small: 500px
//content space
$content_max_width: 1024px
*
font-family: 微軟正黑體 !important
//填滿100%尺寸
@mixin fill
width: 100%
height: 100%
margin: 0px
padding: 0px
//漸變時間 延遲
@mixin trans($t,$td)
transition-duration: $t
transition-delay: $td
//物件獨立位置
@mixin indep
position: absolute
//指定尺寸
@mixin size($w,$h)
width: $w
height: $h
//absolute 置中
@mixin center
+indep
left: 50%
top: 50%
transform: translateX(-50%) translateY(-50%)
//inline-置中
@mixin center_inline
display: inline-block
text-align: center
//裁切框線
@mixin clip($path)
-webkit-clip-path: $path
clip-path: $path
//指定文字
@mixin text($size,$spacing,$color)
font-size: $size
letter-spacing: $spacing
color: $color
*
font-family: 微軟正黑體
text-align: left
//border: solid 1px rgba(0,0,0,0.2) !important
html,body
margin: 0px
padding: 0px
body
background-color: $color_black
text-align: center
.center_box
+center
.mute_btn
position: fixed
z-index: 100
right: 10px
top: 10px
color: $color_yellow
cursor: pointer
///------------------------------
// row settings
///-----------------------------
.min_div
max-width: $content_max_width
text-align: center
padding: 0px
.row
position: relative
//position: absolute
//width: 100%
top: 0px
min-height: 100vh
padding: 50px 100px
text-align: left
& h1
font-size: 50px
letter-spacing: 1px
margin-bottom: 40px
text-transform: uppercase
& h2
font-size: 22px
letter-spacing: 1px
& h3
font-size: 15px
letter-spacing: 1px
& .maintexts
font-size: 14px
letter-spacing: 1px
@media screen and (max-width: $break_big)
padding: 50px 20px
@media screen and (max-width: $break_small)
padding: 10px 15px
.row_black
background-color: $color_black
& *,& h1
color: $color_yellow
.row_yellow
background-color: $color_yellow
& *,& h1
color: $color_white
.row_white
background-color: $color_white
& *,& h1
color: $color_yellow
& input, & textarea
border: none
border: solid 1px $color_yellow
background-color: $color_white
width: 100%
& textarea
min-height: 100px
&::before
content: ""
width: 100vw
height: 100px
background-color: $color_white
display: block
position: absolute
top: -10px
transform: rotate(-3deg)
///background animations
#background_index
position: absolute
left: 0px
top: 0px
#background_intro
position: absolute
left: 0px
top: 0px
#background_contact
position: absolute
left: 0px
top: 0px
width: 100%
height: 100%
background-color: $color_white
.span_100vh
height: 100vh
background-color: transparent
///-------------------------------
// detailed settings
///-------------------------------
.row_index
& .index_center
+center
& .icon
+size(50%,50%)
max-width: 200px
max-height: 200px
& .cls-liconw
fill: none
stroke: #c9a063
stroke-miterlimit: 10
stroke-width: 0.5px
& .cls-licon
fill: none
stroke: #c9a063
stroke-miterlimit: 10
stroke-width: 0.3px
& #icon
cursor: pointer
& #back
+center
+fill
z-index: 0
& #lineab
stroke: #c9a063
opacity: 0.4
& .title
display: flex
+text(12px,7px,#c9a063)
& .title2
margin-top: 10px
font-size: 20px
font-weight: 100
& .cd_wave
transform-origin: 0% 40%
animation: rotate1 2s ease-in-out infinite
& #mainhalfcir
+trans(2s,0s)
& .pointer
transform-origin: 100% 40%
animation-delay: -2s
animation: rotate1 1s ease-in-out infinite
& .pointerb
transform-origin: 100% 100%
animation-delay: -0.5s
animation: rotate2 1.5s ease-in-out infinite
& .d1s
animation-delay: 0.3s
& .d2s
animation-delay: 0.6s
& .d3s
animation-delay: 0.9s
& .mainhalfcir_fast
animation-duration: 1s
& .pointer_fast
animation-duration: 0.5s
& .pointerb_fast
animation-duration: 0.7s
@keyframes rotate1
0%
transform: rotate(-2deg)
50%
transform: rotate(2deg)
100%
transform: rotate(-2deg)
@keyframes rotate2
0%
transform: rotate(-1deg)
50%
transform: rotate(1deg)
100%
transform: rotate(-1deg)
.drawing
stroke-dasharray: 150px
stroke-dashoffset: 150px
animation-name: draw
animation-duration: 2s
animation-fill-mode: forwards // Stay on the last frame
animation-iteration-count: 1// Run
@keyframes draw
to
stroke-dashoffset: 0
.cd_in
animation-delay: 2s
animation: cd_in 1s ease 1
animation-fill-mode: forwards
@keyframes cd_in
0%
transform: translateX(-25px) translateY(-10px)
100%
transform: translateX(0px) translateY(0px)
//--------------------------------
.row_about
position: fixed
width: 100%
top: 0vh
z-index: -1
& .col-sm-4
height: 100vh
background-color: rgba(201,160,99,0.7)
padding: 10px
& .v_center
width: 100%
+center
& canvas
width: 100%
background-color: $color_yellow
//--------------------------------------
//service icons
@keyframes s1draw
0%
stroke-dasharray: 50px
stroke-dashoffset: 50px
40%
stroke-dasharray: 50px
stroke-dashoffset: 0px
60%
stroke-dasharray: 50px
stroke-dashoffset: 0px
100%
stroke-dashoffset: -50px
@keyframes rotater
0%
transform: rotate(-2deg)
50%
transform: rotate(2deg)
100%
transform: rotate(-2deg)
@keyframes scaler
0%
transform: scale(1)
50%
transform: scale(1.05)
100%
transform: scale(1)
@keyframes lrmover
20%
transform: translateX(2px)
50%
transform: translateX(-2px)
80%
transform: translateX(2px)
#score_cir1,#score_cir2,#score_cir3,#score_cir4
animation: lrmover 4s infinite
transform-origin: 50% 50%
#score_cir2
animation-delay: 1s
animation-direction: reverse
#score_cir3
animation-delay: 2s
#score_cir4
animation-delay: 3s
animation-direction: reverse
#s3per1,#s3per2
animation: lrmover 5s infinite
transform-origin: 50% 50%
#s3per2
animation-duration: 4s
animation-direction: reverse
#s1bc
animation: scaler 4s infinite
transform-origin: 50% 50%
#s1mc
animation: scaler 4.5s infinite
transform-origin: 50% 50%
#s1sc
animation: scaler 5s infinite
transform-origin: 50% 50%
#s1playbtn
animation: rotater 2s infinite
transform-origin: 50% 50%
// .s1line
// animation: s1draw 3s infinite
// stroke-dasharray: 50px
// stroke-dashoffset: 50px
#s2all
animation: rotater 3.5s infinite
transform-origin: 50% 50%
@keyframes s2musicbomb
0%
transform: scale(1)
opacity: 1
10%
transform: scale(1.1)
opacity: 1
80%
transform: scale(1)
opacity: 1
100%
transform: scale(1)
opacity: 1
@keyframes s2boardhitting
0%
transform: rotate(3deg)
20%
transform: rotate(-1deg)
50%
transform: rotate(1deg)
80%
transform: rotate(-1deg)
100%
transform: rotate(3deg)
#s2musicbomb
animation: s2musicbomb 2s infinite
transform-origin: 50% 50%
animation-delay: 0.1s
#s2cir1,#s2cir2,#s2cir3
transform-origin: 50% 50%
animation: scaler 2s infinite
#s2boardtop
transform-origin: 0% 100%
animation: s2boardhitting 4s infinite
//----------------------------------
.row_service
min-height: 50vh
& .sv_icon
width: 100%
max-height: 200px
background-color: $color_white
& .col_service
padding: 60px
& h2
padding: 5px
padding-left: 8px
padding-right: 20px
font-size: 19px
letter-spacing: 3px
font-weight: 900
border-bottom: solid 2px $color_yellow
//---------------------------------
.row_works
& .col_tracks
height: 600px
//-----------------------------------
.row_projects
& .proj
padding: 0px 0px 50px 0px
& h2
border-bottom: solid 1px $color_yellow
padding-bottom: 10px
& video,& iframe
background-color: $color_black
width: 100%
min-height: 400px
& .people_pic
background-color: $color_white
& .title,& .maintexts
color: $color_yellow
& .introduction
border: solid 1px $color_white
& .people_pic > img
width: 130%
max-width: 100px
border-radius: 100%
overflow: hidden
margin-top: -50px
border: solid 4px $color_yellow
//--------------------------
.row_contact
.contactform
height: auto
overflow: hidden
transition-duration: 0.6s
border: solid 2px $color_yellow
padding: 0px !important
background-color: $color_white
&:before
content: " ● ● ●"
font-size: 14px
color: white
display: block
width: 100%
height: 20px
background-color: $color_yellow
& .submitbtn
width: 45%
height: 30px
background-color: $color_yellow
color: white
padding: 5px 0px
margin-top: 10px
margin-bottom: 10px
letter-spacing: 4px
text-align: center
cursor: pointer
//------------
footer.row_footer
min-height: initial
& .icon_sm
width: 80px
padding-right: 10px
border-right: solid 1px $color_yellow
margin-right: 20px
window.requestAnimFrame = (function(){
return window.requestAnimationFrame || //Chromium
window.webkitRequestAnimationFrame || //Webkit
window.mozRequestAnimationFrame || //Mozilla
window.oRequestAnimationFrame || //Opera
window.msRequestAnimationFrame || //IE
function(callback){
window.setTimeout(callback, 1000 / 60);
};
})();
var color_yellow = "#c9a063";
var mouse_down=false;
$(window).mousedown(function(){
mouse_down=true;
});
$(window).mouseup(function(){
mouse_down=false;
});
$("#icon").hover(function(){
$("#mainhalfcir").toggleClass("mainhalfcir_fast");
$(".pointer").toggleClass("pointer_fast");
$(".pointerb").toggleClass("pointerb_fast")
},function(){
$("#mainhalfcir").toggleClass("mainhalfcir_fast");
$(".pointer").toggleClass("pointer_fast");
$(".pointerb").toggleClass("pointerb_fast")
});
function get_canvas_element_by_id(id){
var c = document.getElementById(id);
return c.getContext("2d");
}
var index_ctx=get_canvas_element_by_id("background_index");
var intro_ctx=get_canvas_element_by_id("background_intro");
var contact_ctx=get_canvas_element_by_id("background_contact");
var global_time=0;
var index_canvas_size={width:$(".row_index").outerWidth(),height:$(".row_index").outerHeight()};
function main_ani_frame() {
global_time+=3;
draw_index(index_ctx,global_time);
draw_intro(intro_ctx,global_time);
draw_contact(contact_ctx,global_time);
requestAnimationFrame(main_ani_frame);
}
requestAnimationFrame(main_ani_frame);
var finish_flag=true;
var sending_reg_mail=false;
$(".submitbtn").click(function(){
var inputlist=[
{colname:"姓名",el:"#reg_name"},
{colname:"信箱",el:"#reg_email"},
{colname:"手機",el:"#reg_phone"},
{colname:"內容",el:"#reg_content"}
];
var maildata={
reg_name: $("#reg_name").val(),
reg_email: $("#reg_email").val(),
reg_phone: $("#reg_phone").val(),
reg_content: $("#reg_content").val()
};
finish_flag=true;
for(var i=0;i<inputlist.length;i++){
if ($(inputlist[i].el).val()==""){
finish_flag=false;
$(inputlist[i].el).css("border","solid 1px red");
}else{
$(inputlist[i].el).css("border","");
}
}
if (!finish_flag){
alert("資料未填寫完整!");
}else if (sending_reg_mail){
alert("報名信寄送中...請稍後");
}else{
sending_reg_mail=true;
$(".submitbtn").text("聯絡信寄送中...請稍後");
//maildata.mail_addr="[email protected]";
$.ajax({
url: "http://dyverse.studio/mail/testmail.php",
data: maildata,
success: function(res){
if (res=="Y"){
$(".submitbtn").text("聯絡信寄出成功! 請靜待回覆");
setTimeout(function(){
sending_reg_mail=false;
$(".submitbtn").text("送出");
},500);
}else{
$(".submitbtn").text("聯絡信寄出失敗..請再試一次");
sending_reg_mail=false;
}
}
});
}
});
$(window).resize(initial_canvas);
function initial_canvas(){
$("#background_index").attr({
"width": $(".row_index").outerWidth()+"px",
"height": $(".row_index").outerHeight()+"px"
});
$("#background_intro").attr({
"width": $(".row_about").outerHeight()+"px",
"height": $(".row_about").outerHeight()+"px"
})
$("#background_contact").attr({
"width": $(".row_contact").outerHeight()+"px",
"height": $(".row_contact").outerHeight()+"px"
})
mpos={x: $(".row_index").outerWidth()/2,y:$(".row_index").outerHeight()/2};
$
index_canvas_size={width:$(".row_index").outerWidth(),height:$(".row_index").outerHeight()};
}
var mouse={x:0,y:0};
var mm=false;
$(window).mousemove(function(evt){
mouse.x=evt.pageX;
mouse.y=evt.pageY;
mm=true;
});
initial_canvas();
var pagewave=10;
var pagewave_range={min: 10,max: 50};
var pagewave_offset=0;
var pagewave_act=0;
$( window ).scroll(function() {
pagewave+=(pagewave_range.max-pagewave)*0.02;
pagewave_offset++;
pagewave_act/5;
});
function draw_index(ctx,time){
ctx.clearRect(0,0,2000,2000);
for(var cc=0;cc<5;cc++){
var baser =300+cc*150-mouse.y/100+mouse.x/100;
ctx.beginPath();
//ctx.moveTo(mpos.x+baser,mpos.y);
for(var i=0;i<360;i++){
var ang=i;
var radang=2*Math.PI*ang/360+cc+((cc+i*(cc%(3)))%(cc+4))*20+mouse.x/100;
var nowr=1.5*(Math.sin((10+Math.sin(time/(400-cc*10))+cc/2)*radang+time/40+mouse.x/100)*(10+100/time))+baser+Math.random()*cc;
ctx.lineTo(mpos.x+nowr*Math.cos(radang),mpos.y+nowr*Math.sin(radang));
}
//ctx.lineTo(mpos.x+baser,mpos.y);
ctx.strokeStyle="rgba(201,160,99,"+(Math.abs(6-cc)/30)+")";
ctx.stroke();
}
ctx.beginPath();
ctx.moveTo(0,index_canvas_size.height);
ctx.lineTo(0,index_canvas_size.height-30);
for(var i=0;i<=index_canvas_size.width;i++){
ctx.lineTo(i,index_canvas_size.height-30+(pagewave+Math.sin((pagewave_offset*3+time)/30))*Math.sin(i/(Math.sqrt(i)+100+(-90/pagewave_act))+time/60+window.scrollY/100));
}
ctx.lineTo(index_canvas_size.width,index_canvas_size.height-30);
ctx.lineTo(index_canvas_size.width,index_canvas_size.height);
ctx.fillStyle="rgb(201,160,99)";
ctx.fill();
ctx.stroke();
pagewave+=(pagewave_range.min-pagewave)*0.05;
pagewave_act++;
}
var creatures=[];
var cr_default={
p: {
x: 300,
y: 300
},
width: 1,
doubletime: 55,
live: 100,
ori_doubletime: 55,
ori_live: 120,
v: {
x: 2,
y: 2
}
};
for(i=0;i<10;i++){
creatures.push(jQuery.extend(true, {}, cr_default));
}
function draw_intro(ctx,time){
var ori_length=creatures.length;
var deleteid=[];
var inc_mos={
x: mouse.x,
y: mouse.y-$(".row_about").offset().top
};
for(var cc=0;cc<ori_length;cc++){
var cr=creatures[cc];
if (mm){
cr.v.x+=(0.5-Math.random())*4;
cr.v.y+=(0.5-Math.random())*4;
cr.width+=Math.random()/60;
if (Math.random()<0.001 && typeof mouse.x !== "undefined")
{
var new_cr=jQuery.extend(true, {}, cr_default);
new_cr.p.x=inc_mos.x;
new_cr.p.y=inc_mos.y;
creatures.push(new_cr);
}
cr.p.x+=(inc_mos.x-cr.p.x)*0.05*Math.random();
cr.p.y+=(inc_mos.y-cr.p.y)*0.05*Math.random();
}
if (mouse_down){
cr.p.x+=(inc_mos.x-cr.p.x)*0.05*Math.random();
cr.p.y+=(inc_mos.y-cr.p.y)*0.05*Math.random();
}
cr.width+=Math.abs(Math.sin(time/100))/50;
if (cr.live>=0){
cr.p.x+=cr.v.x;
cr.p.y+=cr.v.y;
cr.v.x*=0.99;
cr.v.y*=0.99;
cr.live--;
cr.v.x+=0.5-Math.random();
cr.v.y+=0.5-Math.random();
cr.doubletime--;
if (cr.doubletime<=0 && ori_length<220){
cr.doubletime=cr.ori_doubletime;
var ax=2.5-Math.random()*5;
var ay=2.5-Math.random()*5;
var new_cr = jQuery.extend(true, {}, cr);
new_cr.type=(Math.random()<0.2?"line":"fill");
new_cr.ori_live=Math.random()*200+100;
new_cr.live=new_cr.ori_live;
new_cr.width=Math.random()*2+0.2;
new_cr.ori_doubletime=Math.random()*20+30;
new_cr.doubletime=new_cr.ori_doubletime;
new_cr.v.x+=ax; new_cr.v.y+=ay;
cr.v.x-=ax; cr.v.y-=ay;
creatures.push(new_cr);
}
}
}
var newlist=[];
for(var cc=0;cc<creatures.length;cc++){
var cr=creatures[cc];
if (cr.live>0 && cr.p.x>-500 && cr.p.y>-500 && cr.p.y<$("#background_intro").height()+500 && cr.p.x<$("#background_intro").width()+500
){
newlist.push(cr);
}
}
creatures=newlist;
ctx.clearRect(0,0,2000,2000);
//draw mouse
ctx.beginPath();
ctx.arc(inc_mos.x+10,inc_mos.y+10,3,0,2*Math.PI);
ctx.fillStyle="rgb(255,255,255)";
ctx.strokeStyle="rgb(255,255,255)";
ctx.fill();
//draw all
var last_cr;
for(var cc=0;cc<creatures.length;cc++){
var cr=creatures[cc];
ctx.beginPath();
ctx.arc(cr.p.x,cr.p.y,cr.width>cr.live?cr.live:cr.width,0,2*Math.PI);
ctx.fillStyle="rgb(255,255,255)";
ctx.strokeStyle="rgb(255,255,255)";
if (cr.type=="line")
ctx.stroke();
else
ctx.fill();
if (Math.random()<3 && last_cr){
ctx.beginPath();
ctx.moveTo(last_cr.p.x,last_cr.p.y);
ctx.lineTo(cr.p.x,cr.p.y);
ctx.strokeStyle="rgba(255,255,255,"+1/(cc/10+5)+")";
ctx.stroke();
}
last_cr=cr;
}
mm=false;
}
$(".contactform").keydown(function(e){
contact_noise_height=200;
});
var contact_noise_height=200;
function draw_contact(ctx,time){
ctx.clearRect(0,0,2000,2000);
ctx.beginPath();
ctx.moveTo(0,index_canvas_size.height);
ctx.lineTo(0,index_canvas_size.height-30);
for(var i=-200;i<=index_canvas_size.width+200;i+=3){
var newy=Math.random()*contact_noise_height-contact_noise_height/2+index_canvas_size.height/2;
ctx.lineTo(i,newy);
}
ctx.strokeStyle="rgb(201,160,99)";
ctx.stroke();
contact_noise_height*=0.9;
//ctx.stroke();
}
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-52977512-7', 'auto');
ga('send', 'pageview');
Also see: Tab Triggers