• Home
  • News
  • Software
  • Knowledge
  • MMO
  • Tips
  • Security
  • Network
  • Office
AnonyViet - English Version
  • Home
  • News
  • Software
  • Knowledge
  • MMO
  • Tips
  • Security
  • Network
  • Office
No Result
View All Result
  • Home
  • News
  • Software
  • Knowledge
  • MMO
  • Tips
  • Security
  • Network
  • Office
No Result
View All Result
AnonyViet - English Version
No Result
View All Result

Summary of Code for Tet decoration for Website

AnonyViet by AnonyViet
January 26, 2023
in Tips
0

At the approaching Tet holiday, we also need to decorate our Website for the joyful atmosphere of spring. In this article, I will synthesize some javascript and css codes to create scenes of peach blossom, apricot blossom, and Tet couplets to make your Website more vivid.

Join the channel Telegram of the AnonyViet 👉 Link 👈

Summary of Code for Tet decoration for Website

New Year’s Code for Website in the corner of Website

CSS:

<style type="text/css">
        .tet_left img, .tet_right img {
            width: 100%;
            height: auto;
        }
        .tet_left, .tet_right {
            position: fixed;
            top: 0;
            left: 0;
            z-index: 99;
            width: 191px;
            pointer-events: none;
        }
        .tet_right {
            left: auto;
            right: 0;
            width: 191px;
        }
                .tet_bottom {
            position: fixed;
            bottom: 0;
            left: 80px;
            z-index: 99;
            width: 320px;
            pointer-events: none;
        }
                @media (max-width: 1331px){
            .tet_left, .tet_right, .tet_bottom{
                display: none !important;
            }
        }
</style>

This paragraph is placed in the Head tag of the Website

<div class="tet_left"><img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgb3PBtYvcb0AwzJvp5rDfHAOlC_0BsSevp3we6JTICzZAbrhaLcMtlnOAvCb_6A_LuZfnDSCYUVp5M6a_SSq1tQ825ioZ3H1mkboSV8OA7y-cqo723yZJVuniaCibs715peZlIoVfENoBVvigVfJJDffiAoij6tWFv4Jx3RWIVUcQDN5zeMWweAuCuCw/s16000/left-1.png" alt="AnonyViet-Tet"/></div> 
<div class="tet_right"><img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhmE7w44KuUqFCci75HHT6fo4Snv-s9j8NpP9ERbJhtT9WOasSnDeiDGruspoNUbHQBENce0laVEZZaQc0C-V5pZBPhNgX2ktJprmXpW96EgMHVBBDdbO2UugIYyNY-nXST_nKFcDwDXDiBqM7LZktNIrkgDqQEtdnvYxtt5ZCoV82VNKgSYUIxT1OzYg/s16000/right-1.png" alt="AnonyViet-Tet"/></div>
<div class="tet_bottom"><img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgwruFlhClo3FUKNBQtDvqWYiDVOoi-IT7Jy4R11OU5HaOFR2N7CcX5sH4FWQI_GRoVrx4Hd5pVQREJ_QsAjvSA41v25TW0LEGW2jb8s3J2QwCrXp4qsMqdvxUZz9lglGyxL4YQxIbbf17zyqd99Rr28rDzx-foaXJRQ13kQUAblMtlt4U1rKMYbHkn5w/s16000/bottom-1.png" alt="AnonyViet-Tet"/></div>

Falling Peach Blossom Code

Copy this Javascript and put it in the middle of the tag <head></head> for Website.

<script type="text/javascript">
        var no = 20;
        if (matchMedia('only screen and (max-width: 767px)').matches) {
            no = 10        }
        let img_url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEizrrtX-KQtKY8e8pxCHjLROT5pYW7sVkUpET9HHpW8QO-PnoIRKVsvRDxM6shrE4Q-44Oh9teSGK1SApaZ1OJvhR4z7ENgKSJOLWfsdKw9jPszAa2HqaE6W8ohyGHRvff6TgKXEUjnn73LLLp3FHbtMTJnIkPxPhujWwG5ZsFgW7ctQ0zrR5KKSqlewg/s16000/hoadao-anonyviet.com.png";
        var hidesnowtime = 0;
        var color_snow  = '#fff';
        var snowdistance="windowheight"; // windowheight or pageheight;
        var ie4up = (document.all) ? 1 : 0;
        var ns6up = (document.getElementById && !document.all) ? 1 : 0;

        function iecompattest() {
            return (document.compatMode && document.compatMode != 'BackCompat') ? document.documentElement : document.body
        }

        var dx, xp, yp;
        var am, stx, sty;
        var i, doc_width = 800, doc_height = 600;
        if (ns6up) {
            doc_width = self.innerWidth;
            doc_height = self.innerHeight
        } else if (ie4up) {
            doc_width = iecompattest().clientWidth;
            doc_height = iecompattest().clientHeight
        }
        dx = new Array();
        xp = new Array();
        yp = new Array();
        am = new Array();
        stx = new Array();
        sty = new Array();
        for (i = 0; i < no; ++i) {
            dx[i] = 0;
            xp[i] = Math.random() * (doc_width - 50);
            yp[i] = Math.random() * doc_height;
            am[i] = Math.random() * 20;
            stx[i] = 0.02 + Math.random() / 10;
            sty[i] = 0.7 + Math.random();
            if (ie4up || ns6up) {
                document.write('<div id="dot'+i+'" style="POSITION:fixed;Z-INDEX:'+(99+i)+';VISIBILITY:visible;TOP:15px;LEFT:15px;pointer-events: none;width:15px"><span style="font-size:18px;color:'+color_snow+'"><img src="'+img_url+'" alt=""></span></div>');
            }
        }

        function snowIE_NS6() {
            doc_width = ns6up ? window.innerWidth - 10 : iecompattest().clientWidth - 10;
            doc_height = (window.innerHeight && snowdistance == 'windowheight') ? window.innerHeight : (ie4up && snowdistance == 'windowheight') ? iecompattest().clientHeight : (ie4up && !window.opera && snowdistance == 'pageheight') ? iecompattest().scrollHeight : iecompattest().offsetHeight;
            for (i = 0; i < no; ++i) {
                yp[i] += sty[i];
                if (yp[i] > doc_height - 50) {
                    xp[i] = Math.random() * (doc_width - am[i] - 30);
                    yp[i] = 0;
                    stx[i] = 0.02 + Math.random() / 10;
                    sty[i] = 0.7 + Math.random()
                }
                dx[i] += stx[i];
                document.getElementById('dot' + i).style.top = yp[i] + 'px';
                document.getElementById('dot' + i).style.left = xp[i] + am[i] * Math.sin(dx[i]) + 'px'
            }
            snowtimer = setTimeout('snowIE_NS6()', 10)
        }

        function hidesnow() {
            if (window.snowtimer) {
                clearTimeout(snowtimer)
            }
            for (i = 0; i < no; i++) document.getElementById('dot' + i).style.visibility = 'hidden'
        }

        if (ie4up || ns6up) {
            snowIE_NS6();
            if (hidesnowtime > 0) setTimeout('hidesnow()', hidesnowtime * 1000)
        }
    </script>

If you are using WordPress you can install DevVN Plugin – Vietnamese New Year Decoration for convenience

DevVN – Vietnamese New Year Decoration

In addition, you can use Javascript to decorate Tet like

The article achieved: 5/5 – (100 votes)

Tags: CodedecorationSummaryTếtWebsite
Previous Post

Lesson 59: How to create a Holiday Calendar in Excel

Next Post

Instructions to decorate the Desktop with a Christmas tree in the corner of the screen

AnonyViet

AnonyViet

Related Posts

Cách Đăng ký Nhận Code ChatGPT Business
Tips

Cách Đăng ký Nhận Code ChatGPT Business

November 2, 2026
Instructions for cleaning LG TV with Antigravity to help it run faster
Tips

Instructions for cleaning LG TV with Antigravity to help it run faster

October 30, 2026
Quét lỗ hổng bảo mật cho Vide Coding bằng Security Audit Skill
Tips

Quét lỗ hổng bảo mật cho Vide Coding bằng Security Audit Skill

October 27, 2026
Instructions for registering for OxionAI Pro for 1 year with many powerful AI models
Tips

Instructions for registering for OxionAI Pro for 1 year with many powerful AI models

October 24, 2026
How are Windows 11 Pro and Windows 10 Pro different?
Tips

How are Windows 11 Pro and Windows 10 Pro different?

October 23, 2026
Instructions for using CleanYourTV: Remove ads on Android TV, Google TV
Tips

Instructions for using CleanYourTV: Remove ads on Android TV, Google TV

October 23, 2026
Next Post
Instructions to decorate the Desktop with a Christmas tree in the corner of the screen

Instructions to decorate the Desktop with a Christmas tree in the corner of the screen

0 0 votes
Article Rating
Subscribe
Login
Notify of
guest

guest

0 Comments
Oldest
Newest Most Voted

Recent News

Cách Đăng ký Nhận Code ChatGPT Business

Cách Đăng ký Nhận Code ChatGPT Business

November 2, 2026
Receive Driver Booster 14 license key immediately for free for 6 months

Receive Driver Booster 14 license key immediately for free for 6 months

November 1, 2026
Online pagoda game: Experience practice and relieve stress at home

Online pagoda game: Experience practice and relieve stress at home

November 1, 2026
Instructions for receiving Avira Prime 3 months for free, no credit card

Instructions for receiving Avira Prime 3 months for free, no credit card

October 31, 2026
Cách Đăng ký Nhận Code ChatGPT Business

Cách Đăng ký Nhận Code ChatGPT Business

November 2, 2026
Receive Driver Booster 14 license key immediately for free for 6 months

Receive Driver Booster 14 license key immediately for free for 6 months

November 1, 2026
Online pagoda game: Experience practice and relieve stress at home

Online pagoda game: Experience practice and relieve stress at home

November 1, 2026
AnonyViet - English Version

AnonyViet

AnonyViet is a website share knowledge that you have never learned in school!

We are ready to welcome your comments, as well as your articles sent to AnonyViet.

Follow Us

Contact:

Email: anonyviet.com[@]gmail.com

Main Website: https://anonyviet.com

Recent News

Cách Đăng ký Nhận Code ChatGPT Business

Cách Đăng ký Nhận Code ChatGPT Business

November 2, 2026
Receive Driver Booster 14 license key immediately for free for 6 months

Receive Driver Booster 14 license key immediately for free for 6 months

November 1, 2026
  • Home
  • Home 2
  • Home 3
  • Home 4
  • Home 5
  • Home 6
  • Next Dest Page
  • Sample Page

say88 tỷ lệ kèo nhà cái kèo nhà cái 5 febet

No Result
View All Result
  • Home
  • News
  • Software
  • Knowledge
  • MMO
  • Tips
  • Security
  • Network
  • Office

say88 tỷ lệ kèo nhà cái kèo nhà cái 5 febet

wpDiscuz
0
0
Would love your thoughts, please comment.x
()
x
| Reply