height

iOS Chrome calculates the wrong height of the document

时光怂恿深爱的人放手 提交于 2021-02-18 10:15:30
问题 In order to fill the whole height of the page, I use height: 100%; for html and body tags, and it works fine until a browser would be closed and reopened. (I don't use 100vh because of issues on mobile devices https://nicolas-hoizey.com/2015/02/viewport-height-is-taller-than-the-visible-part-of-the-document-in-some-mobile-browsers.html ) Steps to reproduce: Open https://angelika94.github.io/rick/ in Google Chrome on iPhone (you will see that navigation (Morty and Beer) is placed on the bottom

iOS Chrome calculates the wrong height of the document

依然范特西╮ 提交于 2021-02-18 10:15:20
问题 In order to fill the whole height of the page, I use height: 100%; for html and body tags, and it works fine until a browser would be closed and reopened. (I don't use 100vh because of issues on mobile devices https://nicolas-hoizey.com/2015/02/viewport-height-is-taller-than-the-visible-part-of-the-document-in-some-mobile-browsers.html ) Steps to reproduce: Open https://angelika94.github.io/rick/ in Google Chrome on iPhone (you will see that navigation (Morty and Beer) is placed on the bottom

iOS Chrome calculates the wrong height of the document

ε祈祈猫儿з 提交于 2021-02-18 10:15:08
问题 In order to fill the whole height of the page, I use height: 100%; for html and body tags, and it works fine until a browser would be closed and reopened. (I don't use 100vh because of issues on mobile devices https://nicolas-hoizey.com/2015/02/viewport-height-is-taller-than-the-visible-part-of-the-document-in-some-mobile-browsers.html ) Steps to reproduce: Open https://angelika94.github.io/rick/ in Google Chrome on iPhone (you will see that navigation (Morty and Beer) is placed on the bottom

CSS - Divs with same height, but different image heights

左心房为你撑大大i 提交于 2021-02-11 13:27:34
问题 Is there any possibility to have divs with same heights, which contains images with different heights? I cannot use height css attribute, because I don't know the heights. * { box-sizing: border-box; } .magazine-items { width: 500px; display:flex; flex-flow:row wrap; } .magazine-item { width:33%; display: grid; grid-template-areas: "image image image" "text text text"; border: 1px solid red; align-content: flex-start; } .magazine-item img { width:100%; } .text{ grid-area: text; } .img { grid

Get image width height javascript

ぃ、小莉子 提交于 2021-02-09 11:48:35
问题 Well, I have this code: http://jsfiddle.net/hv9gB/3/ (function() { var img = document.getElementById('my_image'); // Original var width, height; // Display var d_width = img.width; var d_height = img.height; var updateDetail = function() { document .getElementById('display_size') .innerHTML = 'Display Size: ' + d_width + ' x ' + d_height; document .getElementById('native_size') .innerHTML = 'Original Size: ' + width + ' x ' + height; }; // Using naturalWidth/Height if (img.naturalWidth) {

Firemonkey TEdit height

橙三吉。 提交于 2021-02-08 15:45:08
问题 I'm using Delphi Seattle and my application is for Windows Desktop. I'm trying to change the font size of a TEdit. Consequently the height was also modified. At design time everything works well, but when I run my application TEdit ignores the height modification and the text is cut. I've tried to find FixedHeight as suggested here, but I couldn't find this property. Is it possible to change TEdit Heigth? 回答1: This can be solved by overriding the control’s AdjustFixedSize method. As explained

Setting the width and heights value in div's style tag from variables

拟墨画扇 提交于 2021-02-05 06:36:05
问题 In my javascript file I have the following line: <div id="mygraph" style="width:200px;height:100px;"></div> I'd like to set the width and height values in the style tag from two variables that take their values from the corresponding functions: var my_width = getWidth(); var my_height = getHeight(); How can I accomplish that? I'm missing the correct syntax. Thank you in advance... 回答1: The following assumes that my_height and my_width returned by your functions are plain numbers: document

Determine Scroll Widget height

心不动则不痛 提交于 2021-02-04 21:43:51
问题 I would like to determine if a 'scrollable' widget indeed needs to scroll. I would ultimately like to show something like 'Scroll for more'. How do I achieve this? I could use a combination of LayoutBuilder and a ScrollController. However, ScrollController gives me maxScrollExtent and minScrollExtent only after any event - like say for example user trying to scroll I would like to know during 'build' so that I can determine to show 'Scroll for more' or not depending on the screen dimensions

Determine Scroll Widget height

大兔子大兔子 提交于 2021-02-04 21:41:52
问题 I would like to determine if a 'scrollable' widget indeed needs to scroll. I would ultimately like to show something like 'Scroll for more'. How do I achieve this? I could use a combination of LayoutBuilder and a ScrollController. However, ScrollController gives me maxScrollExtent and minScrollExtent only after any event - like say for example user trying to scroll I would like to know during 'build' so that I can determine to show 'Scroll for more' or not depending on the screen dimensions

Setting width and height as a percentage in JavaScript

南笙酒味 提交于 2021-01-29 15:57:15
问题 Here is my JavaScript code: a.width = a.width ? a.width : 640; a.height = a.height ? a.height : 360; How can I make the 640px and 360px percentages instead? I want them both to be 70% of the windows size. 回答1: If the container of the element have sizing specified already, then you can simply use percentages in CSS. For instance: .#my-el { width: 70%; height: 70%; } <div id="my-el"></div> However, if you have to use JavaScript for some reason, you could do something like: el.style.width = Math