Creating a unique CSS animation featuring a vertical line intersecting a horizontal line

Check out this cool expanding line animation I created using CSS, see it in action here

I'm looking for assistance on how to add vertical lines at both ends once the animation stops.

Something similar to the image shown below: https://i.sstatic.net/Yhf7N.png

If anyone can lend a hand with this, I would greatly appreciate it. Thanks!

Answer №1

One approach could involve utilizing pseudo elements

.bar::before,
.bar::after
{
  content: ''; /* necessary for pseudo elements */
  width: 6px;
  height: 25px;
  position: absolute;
  background: blue;
}
.bar::after { right: 0 } /* align to the right */
.bar::before { left: 0 } /* align to the left */

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

"Implementing a function to automatically input a selected value from a dropdown menu into a text field

I'm facing an issue and need some help. I have a form with one select field and one text field. What I want is for the text field to display a value corresponding to the option selected in the select field. For example, if I choose "B" from the select ...

Using the MVC architecture in the R programming language

I am a new R user looking to develop a web app using shiny. I need to create a login page and a private zone, but all the tutorials I have found are not using HTML for the interface. Instead, they use ui.r structure which is limiting my flexibility. Is th ...

The functionality of absolute import seems to be malfunctioning in React Vite js

Issue with vite config not importing from src folder error message: Failed to resolve import "redux/1space/letter/inboxSlice" from "src/pages/letter/index.jsx". Is the file present? / import { loadInboxs } from "redux/1space/lette ...

In Vue.js, I only want to retrieve and display the parent's ID or name once for each of its child components

<td v-if="currentId != loop.id" class="text-center"> <div :set="currentId = loop.id">{{ loop.id }}</div> </td> <td v-else></td> Looking to achieve a specific layout like this This invo ...

Utilizing plain HTML, the input type date feature can be customized to restrict the minimum date selection to January 1,

What is the proper way to define a minimum date for <input type="date"> in HTML? I attempted using the min attribute, but it did not produce the desired result. Appreciate any help on this matter. ...

What is the source of the width for this expansive dropdown menu?

I can't seem to crack this puzzle. When you navigate to the following link: click here, and select 'Accordian' from the topbar menu, where exactly does the dropdown menu width originate from? Upon inspecting it, I only see a computed value w ...

Create a scrollable horizontal list of items

I am encountering an issue with my mat chip list in Angular Material. I have a mat chip list filled with mat-chips that I want to display in a single row. If there are more items than can fit on the screen, I would like the area to be scrollable horizonta ...

Attempting to align the dropdown menu to the left side

This is a challenge I'm facing: https://i.sstatic.net/d3PtN.png I'm attempting to align it in the following way: https://i.sstatic.net/GCwEO.png Below is the HTML code snippet: <li class='list-group-item'> <!-- The dropdow ...

Arrange JSON information in an HTML table with distinct header rows for every data category

I have a JSON object with a key:value pair named callRoot. Some examples of values for this pair are @S, @C, and @W. There are multiple objects that share the same value and I want to create an HTML table head row at the beginning of each group and repeat ...

Utilizing Angular 2+ with the [innerHTML] property to incorporate HTML with added style attributes

I am currently utilizing Angular 2+ [innerHTML] input for inserting HTML formatting that includes style tags. Within my template, the code looks like this: <span [innerHTML]="someVar"></span> In the component file, I have defined: someVar = ...

Selenium encountered an error when trying to execute the 'querySelector' function on the document. The selector provided, my_selector, is not recognized as a valid selector

Whenever I run this code: document.querySelector(my_selector) using selenium, an error is thrown: Failed to execute 'querySelector' on 'Document' my_selector is not a valid selector my_selector is definitely a valid selector that func ...

Preserve the data from various select boxes using their respective ids

I am facing an issue with handling select boxes within an ng-repeat loop in my AngularJS application. Each object has one or more select boxes, and the user needs to select 3 priorities from these boxes and save them by clicking a button. In the save funct ...

Conceal the Ipad keyboard while still retaining the ability to input text using a customized keyboard

I need to create an input field where users can enter numbers using a custom "keyboard" created with CSS/HTML on the page. This means I don't want the iPad's keyboard to pop up. Most of the solutions I've come across involve removing focus f ...

Is there a way to eliminate the # sign from hash data using jQuery?

Can anyone help me retrieve the hash value from the URL? var hash = window.location.hash; I am looking for a way to remove the "#" sign from the hash. Any suggestions? ...

What is the best way to detect clicks on numerous images?

Seeking a solution for handling click events on multiple imagemaps within an iOS uiwebview to manage scaling across various iOS devices. While the click handler functions properly for the first image, it fails to work for subsequent images. How can I ensur ...

Unable to incorporate additional functions while using directives

http://example.com Is there a way to incorporate an addChild(tree) function into this code in order to expand the data array? I have made changes to the template as shown below: '<p>{{ family.name }}{{test }}</p>'+ '<ul>& ...

Detecting Memory Leaks in a Node.js/Express.js Application

I've been dealing with memory problems in my Express.js web app lately. It keeps crashing with the following error: FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory Initially, when I launch the service, the memory u ...

Having trouble with importing files from a different folder in a React Typescript project

I have a specific folder arrangement set up https://i.sstatic.net/GFOYv.png My goal is to bring both MessageList.tsx and MessageSent.tsx into my Chat.tsx file // Chat.tsx import React from 'react' import {MessageList, MessageSent} from "./ ...

Find the current location of the scroll bar on the view port

Currently, I am utilizing the Addazle React grid for my project. However, I need to incorporate endless scrolling functionality which is not already included in this grid system. Thus, I am tasked with devising my own solution for this issue. To successful ...

Translating PCRE(PHP) regular expressions into ECMAScript(Javascript) syntax

I have this PCRE Regex that I'm using to validate JSON strings, but now I need to convert it to JavaScript so I can use it for validation in a React application. PCRE Regex - /(?(DEFINE) (?<json>(?>\s*(?&object)\s*|\s* ...