Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Pro Blog
  • Users
  • Groups
  • Unsolved
  • Solved
Collapse
Secnto AI
  1. Secnto AI
  2. Categories
  3. Virtual University
  4. Computer Sciences
  5. Web Designing
  6. How to make this illumination effect with CSS
How to make this illumination effect with CSS
Leader LeaderL
simulate a “scan” light that will reveal words in a box, this is my code by now: const e = document.getElementsByClassName('scan')[0]; document.onmousemove = function(event){ e.style.left = `${event.clientX}px`; }; *{ margin: 0; padding: 0; } html, body{ width: 100%; min-height: 100vh; overflow-x: hidden; display: flex; } .banner{ width: 100vw; height: 100vh; display: flex; flex-grow: 1; flex-direction: row; align-items: center; background-color: #031321; } .banner .scan{ width: 7px; height: 80%; position: absolute; left: 30px; z-index: 3; transition: left 50ms ease-out 0s; border-radius: 15px; background-color: #fff; box-shadow: 0 0 15px 5px #fff, /* inner white */ 0 0 35px 15px #008cff, /* inner blue */ 0 0 350px 20px #0ff; /* outer cyan */ } .banner .description{ width: 100%; color: white; font-size: 3em; text-align: center; -webkit-user-select: none; -ms-user-select: none; user-select: none; } <div class="banner"> <div class="scan"></div> <div class="description"> Just trying something </div> </div> 1.mp4
Web Designing
How to HTML Image Link
M
HTML image link code <a href="...../site-logo.png"><img src="site-logo.png" width="82" height="86" title="Cyberian" alt="Cyberian Logo"></a> Or better use css styling to determine the width and height. <a href="...../site-logo.png"><img src="site-logo.png" width:82px; height:86px" title="Cyberian" alt="Cyberian Logo"></a> This code has the following parts: “” is link tag. “href” attribute sets URL to link to. “” the image start. “src” attribute sets the image file. “title” attribute sets the image tool-tip text. “alt” is the image tag alternative text attribute. “style” attribute sets with “css” with detail size of image “width” and “height” of the image. “” is the link end tag.
Web Designing

How to make this illumination effect with CSS

Scheduled Pinned Locked Moved Web Designing
csseffect with cssilluminationillumination effectillumination effect with css
2 Posts 2 Posters 1.4k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Leader LeaderL Offline
    Leader LeaderL Offline
    Leader Leader
    wrote on last edited by zaasmi
    #1

    simulate a “scan” light that will reveal words in a box, this is my code by now:

    const e = document.getElementsByClassName('scan')[0];
    document.onmousemove = function(event){
      e.style.left = `${event.clientX}px`;
    };
    
    *{
        margin: 0;
        padding: 0;
    }
    
    html, body{
        width: 100%;
        min-height: 100vh;
        overflow-x: hidden;
        
        display: flex;
    }
    
    .banner{
        width: 100vw;
        height: 100vh;
    
        display: flex;
        flex-grow: 1;
        flex-direction: row;
        align-items: center;
        background-color: #031321;
    }
    
    .banner .scan{
        width: 7px;
        height: 80%;
        
        position: absolute;
        left: 30px;
        z-index: 3;
    
        transition: left 50ms ease-out 0s;
        
        border-radius: 15px;
        background-color: #fff;
        box-shadow:
            0 0 15px 5px #fff,  /* inner white */
            0 0 35px 15px #008cff, /* inner blue */
            0 0 350px 20px #0ff; /* outer cyan */
    }
    
    .banner .description{
        width: 100%;
        color: white;
        font-size: 3em;
        text-align: center;
    
        -webkit-user-select: none;
        -ms-user-select: none;
        user-select: none;
    }
    
    <div class="banner">
        <div class="scan"></div>
        <div class="description">
            Just trying something
        </div>
    </div>
    

    1.mp4

    1 Reply Last reply
    0
    • zaasmiZ Offline
      zaasmiZ Offline
      zaasmi
      Cyberian's Gold
      wrote on last edited by
      #2

      You can increase the background-size (500px in this example) to increase transition smoothing.

      const e = document.getElementsByClassName('scan')[0];
      const hidden = document.getElementsByClassName('hidden')[0];
      
      document.onmousemove = function(event) {
        e.style.left = `${event.clientX}px`; //               ↓ background width (500px) / 2
        hidden.style.setProperty("--pos", `${event.clientX - 250}px`);
      };
      
      
      * {
        margin: 0;
        padding: 0;
      }
      
      html,
      body {
        width: 100%;
        min-height: 100vh;
        overflow-x: hidden;
        display: flex;
      }
      
      .banner {
        width: 100vw;
        height: 100vh;
        display: flex;
        flex-grow: 1;
        flex-direction: row;
        align-items: center;
        background-color: #031321;
      }
      
      .banner .scan {
        width: 7px;
        height: 80%;
        position: absolute;
        left: 30px;
        z-index: 3;
        transition: left 50ms ease-out 0s;
        border-radius: 15px;
        background-color: #fff;
        box-shadow: 0 0 15px 5px #fff, /* inner white */
        0 0 35px 15px #008cff, /* inner blue */
        0 0 350px 20px #0ff;
        /* outer cyan */
      }
      
      .banner .description {
        width: 100%;
        color: white;
        font-size: 3em;
        text-align: center;
        -webkit-user-select: none;
        -ms-user-select: none;
        user-select: none;
      }
      
      .hidden {
        background: radial-gradient(dodgerblue 10%, #031321 50%) var(--pos) 50% / 500px 500px no-repeat fixed;
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
      }
      
      <div class="banner">
        <div class="scan"></div>
        <div class="description">
          Just <span class="hidden">hidden</span> something
        </div>
      </div>
      

      Discussion is right way to get Solution of the every assignment, Quiz and GDB.
      We are always here to discuss and Guideline, Please Don't visit Cyberian only for Solution.
      Cyberian Team always happy to facilitate to provide the idea solution. Please don't hesitate to contact us!
      [NOTE: Don't copy or replicating idea solutions.]
      VU Handouts
      Quiz Copy Solution
      Mid and Final Past Papers
      Live Chat

      1 Reply Last reply
      0

      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      How to Build a $1,000/Month PAK VS BAN Live Live Cricket Streaming
      File Sharing
      Earn with File Sharing

      1

      Online

      3.0k

      Users

      2.8k

      Topics

      8.2k

      Posts
      solution
      1235
      discussion
      1195
      fall 2019
      813
      assignment 1
      428
      assignment 2
      294
      spring 2020
      265
      gdb 1
      238
      assignment 3
      79
      • PM. IMRAN KHAN
        undefined
        4
        1
        4.0k

      • Are the vaccines halal or not?
        undefined
        4
        1
        3.8k

      • All Subjects MidTerm and Final Term Solved Paper Links Attached Please check moaaz past papers
        zaasmiZ
        zaasmi
        3
        26
        75.1k

      • CS614 GDB Solution and Discussion
        M
        moaaz
        3
        3
        8.1k

      • How can I receive Reputation earning from Cyberian? 100% Discount on Fee
        Y
        ygytyh
        3
        28
        23.9k
      cyberianC
      cyberian
      | |
      Copyright © 2010-26 RUP Technologies LLC. USA | Contributors
      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Pro Blog
      • Users
      • Groups
      • Unsolved
      • Solved