Skip to content

BackgroundPosition & negative values #1018

Closed
ishuhacode/NativeScript
#6

Description

@manijak

I am trying to use the background-image & background-position in my css. The Image part works, but I am having issues with the background-position.

My bg-image is a sprite image, and I use the position to focus on a specific part of the sprite. It does not seem to work at all with negative values for x & y.

.my-sprite{
background-image:url('~/images/bg-sprite.png');
background-position: -36 -120;
}

Just to test, I also tried to use center/center but it still did not move

.my-sprite{
background-image:url('~/images/bg-sprite.png');
background-position: center center;
}

My guess is it cannot move the bg-image outside the screen bounds?

Activity

  1. added this to the milestone on Nov 3, 2015
  2. self-assigned this
    on Nov 16, 2015
  3. added
    ready for testTSC needs to test this and confirm against live production apps and automated test suites
    and removed on Nov 16, 2015
  4. modified the milestones: , 1.5.1 on Nov 26, 2015
  5. added and removed
    ready for testTSC needs to test this and confirm against live production apps and automated test suites
    on Dec 7, 2015
  6. lock commented on Aug 30, 2019

    @lock

    This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

  7. locked and limited conversation to collaborators on Aug 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions