Get the App
SLTechnology News&Howtos  ›  Development  › 

How to use HTML5 to achieve Christmas Tree effect

Shulou Source: shulou.com Published: 2022-06-01 11:22:51 10月29日 Update

This article mainly shows you "how to use HTML5 to achieve Christmas tree effect", the content is easy to understand, clear, hope to help you solve your doubts, the following let the editor lead you to study and learn "how to use HTML5 to achieve Christmas tree effect" this article.

3D realistic Christmas tree effect written by html5

Html, body {width: 100%; height: 100%; margin: 0; padding: 0; border: 0;}

Div {margin: 0; padding: 0; border: 0;}

.nav {

Position: absolute

Top: 0

Left: 0

Width: 100%

Height: 27px

Background-color: white

Color: black

Text-align: center

Line-height: 25px

}

A {color: black; text-decoration: none; border-bottom: 1px dashed black;}

A:hover {border-bottom: 1px solid red;}

.float {left; margin-left: 10px;}

.next {float: right; margin-right: 10px;}

.green {color: green;}

.red {color: red;}

Textarea {width: 100%; height: 100%; border: 0; padding: 0; margin: 0; padding-bottom: 20px;}

.block-outer {float: left; width: 22%; height: 100%; padding: 5px; border-left: 1px solid black; margin: 30px 3px 3px 3px;}

.block-inner {height: 68%;}

.one {border: 0;}

Var collapsed = true

Function toggle () {

Var fs = top.document.getElementsByTagName ('frameset') [0]

Var f = fs.getElementsByTagName ('frame')

If (collapsed) {

Fs.rows = '250px

/ / enable resizing of frames in firefox/opera

Fs.noResize = false

F [0] .noResize = false

F [1] .noResize = false

} else {

Fs.rows = '30pxMagazine

/ / disable resizing of frames in firefox/opera

Fs.noResize = true

F [0] .noResize = true

F [1] .noResize = true

}

Collapsed =! collapsed

}

Var b = document.body

Var c = document.getElementsByTagName ('canvas') [0]

Var a = c.getContext ('2d')

Document.body.clientWidth; / / fix bug in chrome.

The above is all the contents of the article "how to use HTML5 to achieve Christmas Tree effect". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

Tags: Christmas tree effects content articles learning help lifelike easy to understand more organization knowledge editing industry information information channels channels research Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno MySQL Shulou Information MariaDB Shulou Technology macOS