Skip to content

adcentury/css-star

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CSS Star

Use only css to draw a five-pointed star.

The position of the star is set by the center of it (which is also the center of its Circumcircle), so you can controll it precisely.

An example is available at my CodePen

Usage

  • Copy star.css into your project directory

  • Load css file in your <head> label

<link rel="stylesheet" href="star.css">
  • Generate star with a single div
<div class="star" id="myStar"></div>
  • Set the star's center position and circumcircle radius by css. ()
#myStar {
	left: 50px;
	top: 50px;
	font-size: 50px;	/* use font-size to set the radius */
}
  • Enjoy it!

About

a five-pointed star which can be positioned by its center.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages