Giter Club home page Giter Club logo

cssmr's Introduction

CSSMR

Live Link

Description

CSSMR is an interactive webiste built using CSS, HTML, and Vanilla JavaScript to bring fun and soothing audio and visual effects to users. Users can hover over and click items all over the page to initiate the audio/visual effects. Users can also press keys to play the corresponding sounds.

Alt Text

Users can switch between panes to see all the effects CSSMR has to offer.

Technical Challenges

CSSMR utilizes HTML5 audio tags to play sounds either on hover or on keypress. This was acheived using 'mouseenter' and 'keypress' event listeners.

function ocean() {
    document.getElementById('ocean').className = "ocean"
    let ocean = document.getElementById('oceanAudio');
    ocean.play();

}

function leaveOcean () {
    document.getElementById('ocean').className = "hidden"
    let ocean1 = document.getElementById('oceanAudio');
    ocean1.currentTime = 0;
    ocean1.pause();

}

document.getElementById('sound-1').addEventListener('mouseenter', ocean);
document.getElementById('sound-1').addEventListener('mouseleave', leaveOcean);

Animations were achieved using CSS animations and keyframes.

@keyframes focus {
  0% {
    filter: blur(12px);
    opacity: 0;
  }
   20% {
    filter: blur(8px);
    opacity: 0.3;
  }
   40% {
    filter: blur(6px);
    opacity: 0.5;
  }
   60% {
    filter: blur(4px);
    opacity: 0.7;
  }
  
   80% {
    filter: blur(0px);
    opacity: 1;
  }
  100% {
    filter: blur(0px);
    opacity: 1;
  }
}

cssmr's People

Contributors

hquddus93 avatar

Watchers

 avatar

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.