Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8600413
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T01:36:41+00:00 2026-06-12T01:36:41+00:00

Is it possible to transform a div into this kind of shape then fill

  • 0

Is it possible to transform a div into this kind of shape then fill it with an image? Or better transform an image to that shape? Both with CSS or Javascript.
Then arrange multiple of them in this manner

I intend to group the shapes into several rings as per the second picture. As for the pictures, it will be dynamic, so can’t really pre-cut them.

*Edit: I found out the effect I actually want. It is actually masking. In webkit, this css property: -webkit-mask-box-image works well (I can use .png image too for the mask), but when I tried masking for firefox (using .svg file generated by Illustrator), it doesn’t seem to work. The same .svg file works in Chrome using -webkit-mask-box-image css property

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T01:36:42+00:00Added an answer on June 12, 2026 at 1:36 am

    Yes, it is possible. Even without using any JavaScript or browser specific properties.

    demo

    I’ve tested it and it works on all current versions of Chrome, IE, FF, Opera, Safari (on Windows 7).

    The idea is to have multiple wheels with slices of different angles (get the angle using a skew transform; the slices are also rotated using a rotate transform). The inner wheels cover the the central part of the outer ones.

    The version I’ve made is a pretty simple one, with two wheels, 8 images for the inner wheel (that means each slice of the inner wheel has 360°/8 = 45°) and 12 images for the outer wheel (=> each slice of the outer one has 360°/12 = 30°).

    Relevant HTML:

    <div class='picture-wheel'>
        <div class='outer-wheel wheel'>
            <div class='slice'><div class='bg'></div></div>
            <!-- the rest of the slices, 11 more for this demo -->
            <div class='inner-wheel wheel'>
                <div class='slice'><div class='bg'></div></div>
                <!-- the rest of the slices, 7 more for this demo -->
                <div class='cover-wheel wheel'></div>
            </div>
        </div>
    </div>
    

    Relevant CSS:

    .wheel {
        overflow: hidden;
        position: relative;
        border-radius: 50%;
        box-shadow: 0 0 1em;
    }
    .picture-wheel {
        width: 30em; height: 30em;
        margin: 3em auto 0;
    }
    .slices-wrapper { 
        position: absolute;
        width: 100%; height: 100%;
    }
    .slice {
        overflow: hidden;
        position: absolute;
        bottom: 50%; right: 50%;
        transform-origin: 100% 100%;
    }
    .outer { width: 30em; height: 30em; }
    .inner-wheel {
        transform: rotate(7.5deg);
        width: 21em; height: 21em;
        margin: 4.5em;
    }
    .cover-wheel {
        width: 12em; height: 12em;
        margin: 4.5em;
        box-shadow: inset 0 0 1em;
        background: white;
    }
    .bg {
        border-radius: 50%;
        background-position: 50% 0;
        background-repeat: no-repeat;
        background-size: 8em 6em;
    }
    .outer-wheel > .slice {
        width: 15em; height: 15em;
        transform: skewY(60deg);
    }
    .outer-wheel > .slice:nth-child(2) { transform: rotate(30deg) skewY(60deg); }
    .outer-wheel > .slice:nth-child(3) { transform: rotate(60deg) skewY(60deg); }
    .outer-wheel > .slice:nth-child(4) { transform: rotate(90deg) skewY(60deg); }
    .outer-wheel > .slice:nth-child(5) { transform: rotate(120deg) skewY(60deg); }
    .outer-wheel > .slice:nth-child(6) { transform: rotate(150deg) skewY(60deg); }
    .outer-wheel > .slice:nth-child(7) { transform: rotate(180deg) skewY(60deg); }
    .outer-wheel > .slice:nth-child(8) { transform: rotate(-150deg) skewY(60deg); }
    .outer-wheel > .slice:nth-child(9) { transform: rotate(-120deg) skewY(60deg); }
    .outer-wheel > .slice:nth-child(10) { transform: rotate(-90deg) skewY(60deg); }
    .outer-wheel > .slice:nth-child(11) { transform: rotate(-60deg) skewY(60deg); }
    .outer-wheel > .slice:nth-child(12) { transform: rotate(-30deg) skewY(60deg); }
    .outer-wheel > .slice .bg {
        width: 30em; height: 30em;
        transform: skewY(-60deg) rotate(-15deg);
    }
    .outer-wheel > .slice .bg {
        background-image:
            url(image-for-first-slice-outer.jpg);
    }
    .outer-wheel > .slice:nth-child(2) .bg {
        background-image:
            url(image-for-second-slice-outer.jpg);
    }
    /* background images for the other slices of the outer wheel */
    .inner-wheel > .slice {
        width: 10.5em; height: 10.5em;
        transform: skewY(45deg);
    }
    .inner-wheel > .slice:nth-child(2) { transform: rotate(45deg) skewY(45deg); }
    .inner-wheel > .slice:nth-child(3) { transform: rotate(90deg) skewY(45deg); }
    .inner-wheel > .slice:nth-child(4) { transform: rotate(135deg) skewY(45deg); }
    .inner-wheel > .slice:nth-child(5) { transform: rotate(180deg) skewY(45deg); }
    .inner-wheel > .slice:nth-child(6) { transform: rotate(-135deg) skewY(45deg); }
    .inner-wheel > .slice:nth-child(7) { transform: rotate(-90deg) skewY(45deg); }
    .inner-wheel > .slice:nth-child(8) { transform: rotate(-45deg) skewY(45deg); }
    .inner-wheel > .slice .bg {
        width: 21em; height: 21em;
        transform: skewY(-45deg) rotate(-22.25deg);
    }
    .inner-wheel > .slice .bg {
        background-image:
            url(image-for-first-slice-inner.jpg);
    }
    .inner-wheel > .slice:nth-child(2) .bg {
        background-image:
            url(image-for-second-slice-inner.jpg);
    }
    /* background images for the other slices of the inner wheel */
    

    Another slightly different enhanced version:

    demo

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This may not be possible, but I have a DIV that I am transforming
Is it possible to bend a div with CSS? Some sort of webkit transform...
I'm wondering how is it possible to transform the TypeScript into JavaScript in a
Is it possible to transform following code to Linq that it will look like
I am using this javascript ( Super Table ) to transform my table in
I have a javascript file that looks like this: if (x > 0 &&
Is it possible to transform a usercontrol in Silverlight to a shape of a
Hi is it possible to transform an images perspective. so it's new shape is
I need to transform a div-based XHTML layout into a table based layout using
Is it possible to transform the following Web.config appSettings file: <appSettings> <add key="developmentModeUserId" value="00297022"

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.