Enhancing the appearance of border-style dots by adding a luminous

Is it possible to style the border-style: dotted with a glow effect on each dot?

I've tried adding the glow effect, but it always goes directly to the entire edge of the div border. Can the tiny dots have the glow effect instead?

https://i.sstatic.net/7PABw.png

I'm looking for a way to add a glow effect to those small dots and would appreciate any guidance on this.

Thank you in advance!

Answer №1

One way to add a drop-shadow effect is by using the following CSS code:

.box {
  display:inline-block;
  padding:30px 80px;
  position:relative;
  z-index:0;
}
.box::before {
  content:"";
  position:absolute;
  z-index:-1;
  inset:0;
  border-radius:100px;
  border:10px dotted red;
  filter:drop-shadow(0 0 3px green);
 }
<div class="box">
  Some text
</div>

Alternatively, you can achieve a different look with a blur filter:

.box {
  display:inline-block;
  padding:30px 80px;
  position:relative;
  z-index:0;
}
.box::before {
  content:"";
  position:absolute;
  z-index:-1;
  inset:0;
  border-radius:100px;
  border:10px dotted red;
  filter:blur(2px);
 }
<div class="box">
  Some text
</div>

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

Is there a way to extend the styles applied to elements after the page has finished loading?

I have created an application with a element positioned at the top of the page. Directly below this element is another div. Upon clicking a button within the first element, HTML content from a website is loaded into the second div, bringing along all its ...

Is it possible in JavaScript to have three different input values contribute to a sum without using HTML event attributes?

I've been working my way through the 57 programming exercises book by Brian P. Hogan. For most of these exercises, I've been attempting to create a GUI. In this particular exercise, the goal is to calculate the Simple Interest on a Principal am ...

Tips for achieving a uniform border in Bootstrap's input-group when adding an image

I am working on creating a search box within a navbar and encountering an issue with the border style: https://i.sstatic.net/DCMpX.png My challenge lies in achieving consistent borders - I aim for the icon to have the same border as the "Search..." box w ...

Tips for customizing the default style of input type=“file” in reactjs?

I'm in the process of creating a field for users to select and upload their files. So far, I've developed a basic code snippet for file selection: export const UploadFile = () => { return ( <input type="file" id="fileUpload" onCha ...

Smooth scrolling in JavaScript can lead to unexpected jumps when using scroll-margin-top

I am currently working on implementing smooth scrolling into my website using JavaScript. However, I have run into a problem with CSS property scroll-margin-top causing a sudden jump at the end. The CSS I am using for scroll margins looks like this: class ...

What is the best way to remove a specific child row in jQuery datatables?

I currently have two static default rows and I would like to add more rows below the existing ones without deleting the parent rows. However, I am unsure of how to delete child rows without affecting the parent rows. My parent rows consist of the defaul ...

Ensure that the CSS element pseudo-class does not override the styling of its child

Looking to style an anchor element that contains other HTML elements. Here is the basic code structure: HTML: <div class="container" id="sub-menu"> <div class="row" data-bind="foreach: subMenu"> ...

Issue with JavaScript removeAttribute for the "readonly" attribute not functioning as expected

Hi there, I'm new to JavaScript and I'm trying to remove the readonly attribute from some text input fields. My code seems to be working, but there's a strange behavior where the readonly attribute is removed for about 1 second and then it g ...

What is the best way to place a div inside a navbar element inline?

Having a bit of trouble with my HTML code. I'm working on creating an offcanvas navbar. Here's the code snippet: <nav class="navbar navbar-dark bg-dark"> <div class="container-fluid"> <a cl ...

The menu icon in the Bootstrap 5 navigation bar is not functioning on a specific webpage

I am facing an issue with my menu icon not working properly on mobile devices or when I try to inspect the page and run it on a responsive device. How can I resolve this problem so that users can click on the menu icon to view the navigation items? &l ...

The style of the button label does not persist when onChange occurs

Encountered an interesting issue here. There is a button designed for selection purposes, similar to a select item. Here's the code snippet: <button class="btn btn-primary dropdown-toggle" style="width: 166%;" type="button" id="dropdownMe ...

Adapt the size of HTML video tags based on the width of the screen and level of

Within the site (developed with React, utilizing Typescript and Tailwind), there exists a component that allows users to watch videos (constructed using the HTML Video tag). Additionally, beneath the video, there are various dropdowns and buttons. However, ...

I am experiencing an issue where my mobile responsive website consistently shows the smallest CSS width view. What could be the root of this

Currently, I am developing a mobile-responsive website specifically catered to iPhone 6 Plus and smaller models (iPhone 6 & 5 included). When I preview the site using "Inspect Element" in the Chrome browser with these device settings, everything appears t ...

The modal in Angular15 will automatically show the date decremented by 1 day whenever it is displayed

Every time I open the date field in a modal, it decrements by one day. Here is the associated typescript file: dob!: DatePipe; rescueDate!: string; dateAdded!: string; openEditPetMenu(template: TemplateRef<any>, petId: number, name: string, ...

Give <tbody> the class from the first <tr> using knockout powers

Using the jquery template below results in knockout properly evaluating the databind, but the alert-message block-message class ends up on the <tbody> instead of the targeted <tr>. This issue only occurs when the row with the data-bind is the ...

container that fades away, while the popup remains visible

Is it possible to fade the background of a container without affecting the pop-up form inside? I've come across some solutions, but they all seem to treat them separately. Here's what I'm trying to achieve: <div class='wrapper ...

Using CSS min-height: 100vh will ensure that the container has enough height to fill the entire viewport

Utilizing min-height: 100vh; in my inner call to action div placed on top of a background video has been mostly successful. However, I've encountered an issue where using 100vh with the absolutely positioned video seems to introduce an unwanted margin ...

Changing text on a button with JavaScript toggle functionality: A step-by-step guide

I am looking to implement a feature where I can hide and show overflow content in a div. When I click on the expand button, it expands the content. However, I want this button to toggle and change text as well. Thank you! function descriptionHeightMo ...

The full-width of the Bootstrap 4 container-fluid is affected when the default padding is removed

Trying to create a full-width webpage using Bootstrap 4. Attempting to eliminate the default 15px padding of container-fluid, but encountering issues. Check out the details on jsfiddle. The background is set as purple, yet the jumbotron does not fully co ...

The navigation bar is not extending to fill the entire width of the screen

I recently created a navigation bar using the nav tag and applied CSS to set the width, border, and padding. However, I noticed that there are some empty pixels on each side of the navigation bar that I can't seem to fill up. Here is the HTML code for ...