aspect-ratio

Padding-bottom/top in flexbox layout

末鹿安然 提交于 2019-12-27 16:49:44
问题 I have a flexbox layout containing two items. One of them uses padding-bottom : #flexBox { border: 1px solid red; width: 50%; margin: 0 auto; padding: 1em; display: flex; flex-direction: column; } #text { border: 1px solid green; padding: .5em; } #padding { margin: 1em 0; border: 1px solid blue; padding-bottom: 56.25%; /* intrinsic aspect ratio */ height: 0; } <div id='flexBox'> <div id='padding'></div> <div id='text'>Some text</div> </div> The blue element maintains its aspect ratio

matplotlib (equal unit length): with 'equal' aspect ratio z-axis is not equal to x- and y-

廉价感情. 提交于 2019-12-27 11:01:29
问题 When I set up equal aspect ratio for 3d graph the z-axis does not change to 'equal'. So, this: fig = pylab.figure() mesFig = fig.gca(projection='3d', adjustable='box') mesFig.axis('equal') mesFig.plot(xC, yC, zC, 'r.') mesFig.plot(xO, yO, zO, 'b.') pyplot.show() gives me the following: where obviously the unit length of z-axis is not equal to x- and y-units. How can I make the unit length of all three axes equal? All the solutions I could find did not work. Thank you. 回答1: I believe

How to maintain aspect ratio for Ionic cards

心已入冬 提交于 2019-12-25 08:56:18
问题 I have a list of cards displayed on my Ionic page and I want them to expand proportionally. Here's my code: HTML <ion-content class="home" padding> <ion-card class="event-item" *ngFor="let item of items"> <div [ngStyle]="{'background-image': 'url(' + item.img + ')'}" class="card-thumbnail"></div> <ion-card-content> <p [innerHTML]="item.excerpt"></p> </ion-card-content> </ion-card> </ion-content> SCSS .event-item { margin: 25px 10px; } .card-thumbnail { height: 18rem; background-size: cover;

How Do I Make Sure An iFrame's Aspect Ratio Is Responsive?

送分小仙女□ 提交于 2019-12-24 21:10:45
问题 I have a very simple question. How do I make sure an iframe's aspect ratio is responsive? The iframe is a YouTube Video, and I want the aspect ratio of the iframe to remain 16:9 no matter the browser window size. Here is my current code for mobile devices: @media screen and (max-width: 600px) { iframe, body { max-width: 90vw; height: auto; } } iframe { border: 0; width: 600px; height: 338px; } Because YouTube iframes do not keep aspect ratio automatically, I need a way to keep the aspect

Should I create a flash file for each screen size?

穿精又带淫゛_ 提交于 2019-12-24 17:09:04
问题 I created a swf file for one my clients using a screen size of 1024px x 768px (4:3 ratio), now my client wants to re-use the video in a bigger screen (TV) that still uses a 4:3 ratio but the screen size is considerably bigger (I do not have the exact size yet). Do I need to recreate the flash file using images that fit the new screen size, or the fact that they both use a 4:3 aspect ratio means that the image quality will not suffer? 回答1: It depends on what your SWF contains. If it's a video,

Should I create a flash file for each screen size?

拟墨画扇 提交于 2019-12-24 17:09:01
问题 I created a swf file for one my clients using a screen size of 1024px x 768px (4:3 ratio), now my client wants to re-use the video in a bigger screen (TV) that still uses a 4:3 ratio but the screen size is considerably bigger (I do not have the exact size yet). Do I need to recreate the flash file using images that fit the new screen size, or the fact that they both use a 4:3 aspect ratio means that the image quality will not suffer? 回答1: It depends on what your SWF contains. If it's a video,

Trying to figure out how to match aspect ratio on mac to android

不羁岁月 提交于 2019-12-24 05:06:15
问题 I'm making a shape matching game for toddlers. I drew the shapes using gimp on my mac. The images all seemed stretched out on the android devices. Is there some mathematical way i could figure out how much shorter I have to make the images on the mac computer so they look correctly on the android devices? 回答1: This is a tough question. I have made several Apps for iOS and have pretty much the same problem with graphics for buttons and backgrounds when going between iPhone and iPad, which have

How do I get dynamically fluid images depending on browser window aspect ratio?

别等时光非礼了梦想. 提交于 2019-12-23 19:09:39
问题 This might not be a simple question, but I try my best. I have this example site: http://lotvonen.tumblr.com/ I have a little piece of javascript that automatically calculates the height of the inner browser window and sets that number as image wrapper div's height. Height of the image inside the wrapper is 100% of the wrapper, so that I get nice, full screen images on all normal screen sizes. This works wonderfully on screens that are more wide than tall (desktops, laptops, etc). But! With

plotly 3d surface - change cube to rectangular space

这一生的挚爱 提交于 2019-12-23 18:52:16
问题 I would like to have a 3d plot that is not in a cube, since my z data is 10 times smaller than the scale of x and y axis. How do you set it up so that the 3d plot is not in a cube, but in a rectangular shape instead? (I would like x, y, z axis to be on the same scale as well. That is, x and y are from 0 to 100, while z is from 0 to 10 in this example:) zz = matrix(c(1:10), nrow = 100, ncol = 100) plot_ly(z=zz, x = c(1:100), y = c(1:100), type = 'surface') %>% layout(autorange = F, aspectmode

Two layouts for two aspect ratios (4:3 and 16:9) - changing automatically

隐身守侯 提交于 2019-12-23 11:44:11
问题 Following the Microsoft scale guidelines there is a part where it says: When designing a fixed layout, start by designing your layout for the baseline resolutions: 1024x768 and 1366x768. Regarding this I have the following question: Is it possible to define two fixed layouts for two aspect ratios (both to be used with the ViewBox to scale to every resolution in that aspect ratio) so they can change automatically depending on the screen's aspect ratio? And maybe change between the fill mode