scale

CSS: Wrong position of “transform: scale();” container children

不羁岁月 提交于 2019-12-23 06:54:53
问题 I have a container element with long content which is scaled: .container { transform: scale(0.9); } inside this container I have a child div which is used to be a popup. It's positioned absolute with top 50% .popup { width: 300px; height: 200px; position: absolute; left: 50%; top: 50%; } but unfortunately when container is scaled this 50% is not working. I need to use ~240% if it appears on the bottom of a page. Do you now some specifics on applying positioning on children of scaled elements?

Center drawable and scale height

隐身守侯 提交于 2019-12-23 04:30:14
问题 Since I want to support tablets and smartphones without delivering a special "HD" version, I need to scale my Images depending on the resolution of the users device. This is the ImageView source that looks good on the Samsung Galaxy Nexus: <ImageView android:id="@+id/character" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentBottom="true" android:layout_centerHorizontal="true" android:background="@android:color/transparent" android:scaleType=

scale div to background image size

泄露秘密 提交于 2019-12-23 04:27:08
问题 I have an image that I need to put divs on top of for links. I did this fine when I initially created the website, but now I am tasked with making it responsive, so I can no longer use -top and left values to position the overlay divs because they don't move with the image. Trying to put the image as a background image so that the position of the overlays can be set and contained within the parent container. I have tried using the background size property (cover, contain, 100%), but they will

CSS3 Scale combined with reflect makes blurred elements on chrome

拥有回忆 提交于 2019-12-23 04:12:32
问题 There is a kind of weird bug on chrome when you try to combine css3 scale and css3 reflect on a div with content. I would like to know if someone know a fix or hack to get a sharp result. *The content of my div can be text, video, image, svg... and can contain animation I made the following codepen to illustrate the problem http://cdpn.io/muiKa 回答1: It looks like your best bet is to replace the transform scaling with good old fashioned em scaling. Chris Coyer has a awesome article with

Scale NSView centered

China☆狼群 提交于 2019-12-23 03:08:03
问题 I need to scale an NSView around it's center. I tried using CATransform3DMakeScale and it worked to scale the view towards it's corner but I couldn't achieve to center it. I tried to set the layers anchor point to .5, .5 but that didn't work. I tried using scaleUnitSquareToSize but I ran into the problem that this seems unresetable without a lot of work. In the end I need to be able to set the scale of an NSView to something like 0.8 and have it zoom out around it's center and be able to set

Android Scale a bitmap image

瘦欲@ 提交于 2019-12-23 02:26:48
问题 My application has 9 bitmap images on it in a 3x3 grid. All of them are showing on the screen and depending on how the user interacts with them (tap, double tap, pinch, zoom, drag) the image that is "action-ed on" needs to perform different tasks. So for example, if I tap on one image, it needs to rotate around the it's vertical access completely, then stop. Currently i'm using SurfaceView with the onTouchEvent(..) method. The way I figured I could animate this is by scaling the image's width

Canvas.scale() on Android. Redraw full screen

旧巷老猫 提交于 2019-12-23 01:52:12
问题 So I'm using the example on Android Developers to implement pinch to zoom on my Activity. Im Scaling A Custom View which has a ScrollView(and other things) inside it. When im scaling, only the actual displayed Screen gets resized - but i want the scaled down things to show more of their content, because they have more space to do so when scaled down. I want them to use all the full screen space. My Custom Views ondraw method just looks like this: public void draw(Canvas canvas) { canvas.scale

UIImageView Resizing / Scaling - SWIFT

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-22 18:35:32
问题 I have a UIImageView that's size(width = screensize, height = 239). I now download an image that is size(width = 1366 and height = 445). I can't use Aspect Fit (because of white background) or Scale (screws up the aspect ratio). I do want to use Aspect Fill and align it in a specific way - i.e. aspect fill on right aligned or aspect fill on left aligned. Does anyone know how to do this? I've used different libraries like Toucan but I can't seem to get it to work. Thanks a bunch SO. 回答1: You

Back-transform coefficients from glmer with scaled independent variables for prediction

安稳与你 提交于 2019-12-22 12:56:09
问题 I've fitted a mixed model using the lme4 package. I transformed my independent variables with the scale() function prior to fitting the model. I now want to display my results on a graph using predict() , so I need the predicted data to be back on the original scale. How do I do this? Simplified example: database <- mtcars # Scale data database$wt <- scale(mtcars$wt) database$am <- scale(mtcars$am) # Make model model.1 <- glmer(vs ~ scale(wt) + scale(am) + (1|carb), database, family =

How to scale down an image on the server side with PHP?

送分小仙女□ 提交于 2019-12-22 10:59:07
问题 I have some images that are pulled from a server and $imgUrl holds the path of the image. Right now I use <img src="<?php echo $imgUrl ?>" width="100" height="200"/> or CSS to scale down the image, but I want to do it in PHP so that I will serve already scaled images to the DOM Any ideas? Thanks 回答1: This solution will cause the thumb to be created when it is requested for the first time. All future requests will fetch the already created thumb. It is using ImageMagick: HTML: <img src="script