stretch

How do I stretch an image to fit the whole background (100% height x 100% width) in Flutter?

僤鯓⒐⒋嵵緔 提交于 2019-12-17 15:44:17
问题 I have an image that doesn't match the aspect ratio of my device's screen. I want to stretch the image so that it fully fills the screen, and I don't want to crop any part of the image. CSS has the concept of percentages, so I could just set height and width to 100%. But it doesn't seem like Flutter has that concept, and it's bad to just hard code the height and width, so I'm stuck. Here's what I have (I'm using a Stack since I have something in the foreground of the image): Widget background

CSS Background to stretch to window bottom?

前提是你 提交于 2019-12-13 15:12:58
问题 I am helping to redesign a website www.liveatsheastadium.com/test I am trying to figure out a way to get the transparent background (using the background:rgba property) to stretch the entire height of the page regardless of resolution. I have tried setting the container, html and body height to 100% and using the background:cover property. Any ideas on how to get the background to extend to the bottom of the page regardless of broswer window size? <body> <div id="container"> <div id=

ImageButton Stretching Background Image

♀尐吖头ヾ 提交于 2019-12-13 14:24:10
问题 I am trying to create an ImageButton with no border but I am running into an issue with the sizing of the image button. Using Eclipse ADT I drag an ImageButton to the layout and select my background image. The image button appears as follows: As you can see there is a border between the background image and the image button perimeter which I would like to get rid of. To do so, I set the padding property to 0dp. The image button now looks like this: Finally, I set the scale type to fitXY:

My Webpage Won't Retain it's Width When Narrowed

瘦欲@ 提交于 2019-12-13 06:04:27
问题 and thanks for checking or helping me out with the issue! I'm currently trying to create a simple webpage for the http://www.code.org Computer Science week! I'm trying to create an image based background for my navigation bar at the top of the page. This is what I have so far: HTML5 CODE <!DOCTYPE html> <html> <head> <title>Welcome</title> <link rel="stylesheet" type="css/text" href="CSstylesheet.css" </head> <body> <div> <img src="binarybanner.png" id="bannerimg" /> </div> <div class=

Bootstrap .page-header background image

主宰稳场 提交于 2019-12-12 04:21:23
问题 I am playing with Bootstrap for first time, but I am a little stucked with a basic stuff like stretching of background image. My code looks like that: CSS .page-header { background-image: url("images/header.jpeg") ; -webkit-background-size: cover; /* For WebKit*/ -moz-background-size: cover; /* Mozilla*/ -o-background-size: cover; /* Opera*/ background-size: cover; height: 300px; width: 100%; } And my HTML <header> <nav class="navbar navbar-default"> <div class="container-fluid"> <!-- Brand

Make div stretch to fit td height [duplicate]

怎甘沉沦 提交于 2019-12-12 02:46:07
问题 This question already has answers here : Making a <div> inherit the height of parent (<td>) using only css? (2 answers) Get div to take up 100% body height, minus fixed-height header and footer [duplicate] (8 answers) Closed 5 years ago . Hi I have this code, <html> <body> <table> <tr> <td> <div class="the-div">h:100%</div> </td> <td> <div class="the-div-w-height">h:100px</div> </td> </tr> </table> </body> </html> with this style, .the-div { height: 100%; background-color: red; } .the-div-w

2 column CSS div with stretchable height

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-11 17:37:21
问题 Related (possibly duplicate) questions : How do I achieve equal height divs with HTML / CSS ? Make Two Floated CSS Elements the Same Height Hello, every one, I tried for hours to create a stretchable 2 columns div but without any luck. here is my html code and my css code below it <div class="two_cols_container"> <div class="two_cols"> <div class="left-col"> test </div> <div class="right-col"> test </div> </div> </div> my css code is .two_cols_container { width: 100%; height: 100%; } .two

Stretch a background image (SVG) to 100% width and 100% height?

泄露秘密 提交于 2019-12-11 07:56:24
问题 The behaviour I want to achieve is the width of background-size:cover; , but the height of background-size:contain; by stretching the image. I thought that background-size:100%; should do this, but look at the example - it does not. .container { background-image:url("https://upload.wikimedia.org/wikipedia/commons/3/34/Red_star.svg"); background-position:center center; background-repeat:no-repeat; width:300px; height:180px; background-color:#eef; border-bottom:1px solid #000; } #container1 {

Android - Make a background image not stretch it's assigned view out

前提是你 提交于 2019-12-11 07:12:42
问题 Hooray for pictures! Here's what it looks like when assigning the picture to the background, and when not. I'd very much like for it to not stretch out the top TableView if the image is larger than the table. I've included an empty "view" to give a little bit of extra space for the table's background already as well, as you can see in the XML to follow. Tried to mess around with ScaleType, but that was a wash. How can I get the BG to stretch to fit the layout? I'm trying to handle the "user

ListBoxItem HorizontalContentAlignment=Stretch not working

左心房为你撑大大i 提交于 2019-12-11 06:46:52
问题 I am having trouble getting my listbox items to stretch to the whole listbox width. Below is my xaml for my listbox <ListBox x:Name="MyListBox" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" HorizontalContentAlignment = "Stretch" Margin="0,10,0,0" ItemsSource="{Binding Path=Users}" ScrollViewer.HorizontalScrollBarVisibility="Disabled" Grid.Column="0" Grid.ColumnSpan="1" Grid.Row="1" Grid.RowSpan="3"> <ListBox.ItemTemplate> <DataTemplate> <local:MyListBoxTemplate/> </DataTemplate> <