I’ll give an answer that may be considered a little awkward, but as no rules have been put in unless it is with CSS and without border-radius
there goes one more suggestion (even if "controversy")...
First you will need a very geometric font type a Future, that has the letter The as a perfect circle. Another detail, the more "thick" the stroke of the font the easier to make the effect, so the more Bold best
In my example I used a font in these requirements I found on Google Fonts a Montserrat
After that I just created some css styles for elements ::after I used to cover the "eyes" of the characters. Summarizing just use pseudo elements to plug the holes in the source and have the perfect circle and other forms...
See the result in the example:
html, body {
width: 100%;
height: 100%;
margin: 0;
padding: 0;
background-color: azure;
}
.container {
position: relative;
z-index: 1;
}
.texto {
font-family: 'Montserrat', Verdana, sans-serif;
font-weight: bold;
color: red;
font-size: 10rem;
position: relative;
text-transform: uppercase;
}
.texto-o::after, .texto-p::after, .texto-a::after {
content: "";
position: absolute;
background-color: red;
z-index: -1;
}
.texto-o::after {
top: 30%;
left: 25%;
width: 50%;
height: 45%;
}
.texto-p::after {
top: 30%;
left: 20%;
width: 60%;
height: 25%;
background-color: rgba(255,0,0,0.75);
}
.texto-a::after {
top: 30%;
left: 35%;
width: 30%;
height: 35%;
background-image: url(http://unsplash.it/40/40);
}
<link href="https://fonts.googleapis.com/css?family=Montserrat:400,900" rel="stylesheet">
<div class="container">
<span class="texto texto-o">o</span>
<span class="texto texto-p">p</span>
<span class="texto texto-a">a</span>
<span class="texto">!</span>
</div>
OBS: works from IE8 up https://caniuse.com/#feat=css-gencontent
You can use image, check it out . http://www.html5rocks.com/en/tutorials/shapes/getting-started/? redirect_from_locale=en
– PauloHDSousa
No, not picture, please!
– Wallace Maxters
I take it back. Interesting @Paulohdsousa
– Wallace Maxters
svg
is an option?– Caio Felipe Pereira
kkkk YES. But I know there is another way ;)
– Wallace Maxters
It’s simple, use border-Radius 50% :P - Joking aside, 50% makes more sense, because each edge only takes 50% of the horizontal and vertical. When you put 100%, the browser is "adjusting" the measure in the box.
– Bacco
I would answer that @Bacco, but I re-read the post, and the title should be "how to circle CSS without border-Radius" :p
– David
After reading the answers I can notice one thing,
border-radius
for most needs will always be more practical than anything else.– Guilherme Nascimento