Giter Site home page Giter Site logo

zxuqian / html-css-examples Goto Github PK

View Code? Open in Web Editor NEW
900.0 900.0 352.0 52.69 MB

A collection of HTML and CSS examples, including effects and UIs.

Home Page: https://zxuqian.github.io/html-css-examples/

License: MIT License

HTML 59.66% CSS 27.09% JavaScript 13.25%
css css3 effect html javascript ui

html-css-examples's Introduction

HTML CSS Examples

中文版

This repository contains the source code for my videos at Bilibili, 峰华前端工程师

Text in videos and codes are primarily in Chinese, But you can use this repository without knowing Chinese. Just read the critical part.

You can use this repository for inspirations and cheatsheets.

Online Demo: https://zxuqian.github.io/html-css-examples/

Each folder contains the source code of HTML and CSS examples, including:

  • CSS/SVG Animation
  • Shadows/Glowing/Glass Effects
  • Responsive Layout
  • Type-Writer Effect
  • Face Recognition
  • 3D Transformations
  • Native Canvas
  • and more...

My Personal Homepage

Blog

Bilibili

Or scan the QR code below:

Bilibili 峰华前端工程师

Contributing

Contributing is welcome! Follow these steps to add your examples:

  1. Fork this repository
  2. Create a new branch, starting with feature/.
  3. Structure your project according to the existing ones (note the latest numbering).
  4. Run yarn run watch or npm run watch. This will monitor changes in src/index.js and compile it to /index.js, which is used to display React components for the demo page.
  5. Update src/index.js. Add your example name and link at the top of the uis array, set newItem to true, and remove the newItem property from the previous item.
  6. Test and issue a PR.
  7. Please ensure examples are aethetically pleasing.

Notice: By contributing, you agree that your code may be used for demonstration in some of my videos.

html-css-examples's People

Contributors

phillweston avatar zxuqian avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

html-css-examples's Issues

about 07-3d-cubic-images

只展示5个面,修改代码如下
@keyframes rotate-cube { 0% { transform: rotateX(0deg) rotateY(0deg); } 16.6% { transform: rotateY(-90deg); } 33.2% { transform: rotateX(-90deg); } 49.8% { transform: rotateY(90deg); } 66.4% { transform: rotateX(90deg); } /*这里需要展示后面*/ 83% { transform: rotateX(180deg); } 100% { transform: rotateX(0deg) rotateY(0deg); } }

Circle.changeVelocityAndDirection函数可以更简单

代码如下:

changeVelocityAndDirection(other) {
    let velocity1 = new Vector(this.vx, this.vy);
    let velocity2 = new Vector(other.vx, other.vy);
    let cor = 0.8;

    let cdifn = new Vector(this.x - other.x, this.y - other.y).normalizs();
    let v1n = velocity1.dot(cdifn);
    let v2n = velocity2.dot(cdifn);
    let v1nAfter = (this.mass*v1n + other.mass*v2n + cor*other.mass*(v2n - v1n)) / (this.mass + other.mass);
    let v2nAfter = (this.mass*v1n + other.mass*v2n + cor*this.mass*(v1n - v2n)) / (this.mass + other.mass);

    if(v1nAfter < v2nAfter) {
        console.log(v1n, v2n, v1nAfter, v2nAfter);
        return;
    }

    let velocity1After = velocity1.add(cdifn.multiply(v1nAfter - v1n));
    let velocity2After = velocity2.add(cdifn.multiply(v2nAfter - v2n));

    this.vx = velocity1After.x;
    this.vy = velocity1After.y;

    other.vx = velocity2After.x;
    other.vy = velocity2After.y;
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.