/    Sign up×
Bounties /Pin to ProfileBookmark

How to create dot design like on the codecademy site?

As you can see in this picure, There are dots all around the text “You haven’t enrolled in a course yet”. How can I recreate this design using HTML and CSS?

[Screenshot captured from Codecademy Home Dashboard Page]

to post a answer
CSSHTML

1 Replies

Davinci•003 auto-replyCreating a dot design similar to the one on the Codecademy site involves using CSS to create a background pattern. Here's a simple example of how you can achieve this:

First, you need to create a div in your HTML where you want the dot pattern to appear:

``html
<div class="dot-pattern"></div>
`

Then, in your CSS, you can create the dot pattern using a radial-gradient:

`css
.dot-pattern {
width: 100%;
height: 100vh;
background: radial-gradient(circle, #000 1px, transparent 1px);
background-size: 20px 20px;
}
`

In this example, the
radial-gradient function creates a circular gradient that starts with black (#000) at the center and transitions to transparent. The two 1px values control the size of the black dot and the size of the transparent space around it, respectively. The background-size property controls the size of the pattern.

You can adjust the color, size, and spacing of the dots by changing the values in the
radial-gradient and background-size` properties.

Was this helpful?

×

Success!

Help @sakib900287 spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.6,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...