Giter Site home page Giter Site logo

Comments (6)

fgnass avatar fgnass commented on June 3, 2024 5

Create a DIV and center it on the screen manually. Then use this DIV as target:

<body>
  <div id ="center" style="position:fixed;top:50%;left:50%"></div>
  <script>
    new Spinner().spin(document.getElementById('center'));
  </script> 
</body>

from spin.js.

shazdeh avatar shazdeh commented on June 3, 2024

No idea?

from spin.js.

ponmani avatar ponmani commented on June 3, 2024

Hi fgness,
Your answer is better solution. Thank you

from spin.js.

mrded avatar mrded commented on June 3, 2024

You can do it this way:

<div style="text-align: center;">
  <div class="mdl-spinner mdl-js-spinner is-active" style="margin: 20px;"></div>
</div>

from spin.js.

Gennady-G avatar Gennady-G commented on June 3, 2024

Create a DIV and center it on the screen manually. Then use this DIV as target:

<script> new Spinner().spin(document.getElementById('center')); </script>

Thank You much fgnass!

Best regards,
Gennady

from spin.js.

MrCsabaToth avatar MrCsabaToth commented on June 3, 2024

All someone needs is to specify position: 'fixed' along with 50vh top and 50vw left alignment settings if you want the spinner to be always at center and not being able to scrolled away.

from spin.js.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.