• Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
MagicMirror Forum
  • Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
A New Chapter for MagicMirror: The Community Takes the Lead
Read the statement by Michael Teeuw here.

Display the specified picture in the specified location

Scheduled Pinned Locked Moved Custom CSS
21 Posts 2 Posters 5.9k Views 2 Watching
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • 史 Offline
    史新瑞
    last edited by Jul 28, 2022, 8:48 AM

    I want to display the specified image in the middle of the screen,What should I do

    S 1 Reply Last reply Jul 28, 2022, 11:06 AM Reply Quote 0
    • S Offline
      sdetweil @史新瑞
      last edited by Jul 28, 2022, 11:06 AM

      @史新瑞 use middle_center position?

      Sam

      How to add modules

      learning how to use browser developers window for css changes

      史 1 Reply Last reply Jul 28, 2022, 11:58 AM Reply Quote 0
      • 史 Offline
        史新瑞 @sdetweil
        last edited by Jul 28, 2022, 11:58 AM

        @sdetweil Do you have a specific routine? I am a novice, not familiar with it, thank you

        S 1 Reply Last reply Jul 28, 2022, 12:08 PM Reply Quote 0
        • S Offline
          sdetweil @史新瑞
          last edited by Jul 28, 2022, 12:08 PM

          @史新瑞 what do you mean routine?

          mm is a web page, using normal css and styles

          there are some predefined positions. see css/main.css

          Sam

          How to add modules

          learning how to use browser developers window for css changes

          史 2 Replies Last reply Jul 28, 2022, 1:47 PM Reply Quote 0
          • 史 Offline
            史新瑞 @sdetweil
            last edited by Jul 28, 2022, 1:47 PM

            @sdetweil example:beaming_face_with_smiling_eyes: :beaming_face_with_smiling_eyes:

            1 Reply Last reply Reply Quote 0
            • 史 Offline
              史新瑞 @sdetweil
              last edited by Jul 28, 2022, 1:50 PM

              @sdetweil Have you ever done a similar project? Can I refer to it:folded_hands:

              S 1 Reply Last reply Jul 28, 2022, 2:33 PM Reply Quote 0
              • S Offline
                sdetweil @史新瑞
                last edited by sdetweil Jul 28, 2022, 4:32 PM Jul 28, 2022, 2:33 PM

                @史新瑞 you can look at my version of MMM-ImagesPhotos

                https://github.com/sdetweil/MMM-ImagesPhotos

                I center the image in the background(fullscreen_below), retaining the image dimension ratio, which css cover and contain do not.

                to help with smoothing the transitions and not having blank screen, I use an onLoad() handler to hide the prior and visualize the just loaded image.

                I have not tried these modifications in the middle_center mm position

                Sam

                How to add modules

                learning how to use browser developers window for css changes

                史 2 Replies Last reply Jul 28, 2022, 2:58 PM Reply Quote 0
                • 史 Offline
                  史新瑞 @sdetweil
                  last edited by Jul 28, 2022, 2:58 PM

                  @sdetweil thank you

                  1 Reply Last reply Reply Quote 0
                  • 史 Offline
                    史新瑞 @sdetweil
                    last edited by Jul 29, 2022, 1:35 PM

                    @sdetweil I was wondering how do you set the image position in your CSS program?or automatically read fixed folder pictures and thanks for the instructions

                    S 1 Reply Last reply Jul 29, 2022, 1:39 PM Reply Quote 0
                    • S Offline
                      sdetweil @史新瑞
                      last edited by Jul 29, 2022, 1:39 PM

                      @史新瑞

                      see the on-load handler , line 247 of the MMM-ImagesPhotos.js

                      			img.onload=  (evt) => {
                      

                      Sam

                      How to add modules

                      learning how to use browser developers window for css changes

                      史 1 Reply Last reply Jul 29, 2022, 1:48 PM Reply Quote 0
                      • 1
                      • 2
                      • 3
                      • 1 / 3
                      1 / 3
                      • First post
                        10/21
                        Last post
                      Enjoying MagicMirror? Please consider a donation!
                      MagicMirror created by Michael Teeuw.
                      Forum managed by Sam, technical setup by Karsten.
                      This forum is using NodeBB as its core | Contributors
                      Contact | Privacy Policy