position

position: fixed with background image?

会有一股神秘感。 提交于 2021-02-08 06:45:31
问题 When I add the <!DOCTYPE HTML> on the page I am finding that I have to add position: fixed; into the CSS in order for the image to show up as the background on the "div" otherwise I get a blank, white background. Why does this require that position = fixed in this case? .background_image{ position: fixed; <-----Why is this needed & Why doesn't static work? background: #000 url(../Images/Image.jpg) center center; width: 100%; height: 100%; min-height:100%; background-size: cover; overflow:

Swift Placing TabBar on top of the screen not working in iOS 11

只谈情不闲聊 提交于 2021-02-07 10:51:39
问题 In UITabBarController, I am placing the tab bar on top of the screen using below code : self.tabBar.frame = CGRectMake(0,0,UIScreen.mainScreen().bounds.width,50) This works perfectly on iOS 10. But when the same app is installed on iOS11. It placing at the bottom only and not moving up. Realy dont know what has changed in iOS11 But How to move tabbar up for iOS 11 回答1: After so much struggle figured out the solution. I was placing the tabBar.frame code inside viewDidAppear which works for iOS

Android Studio button positioning

≯℡__Kan透↙ 提交于 2021-02-07 10:23:24
问题 I'm trying to set button position to the bottom right corner of the screen. I've tried with this: button.setX(maxX); button.setY(maxY); but the button is invisible because it's off the screen. EDIT: To clarify. I need to find a way to keep my button WITHIN layout when I set its position to maxX and maxY . To prevent it from going out of bounds. So even if I set its position to something like: button.setX(maxX - 10); button.setY(maxY - 10); it wouldn't stick half out of the screen. 回答1: Please

Position: Sticky Element not being Sticky In Example

孤街浪徒 提交于 2021-02-07 04:09:44
问题 I am trying to make a sticky element (the one with id "sidebar") however, despite checking solutions presented here, I have not been able to make the element sticky in major browsers. body { margin: 0; } #top { position: fixed; top: 0; left: 0; background-color: white; border-bottom: solid 1px #B9D9EB; width: 100%; height: 35px; z-index: 3; } #logo a { font-family: Calibri; font-size: 1.5em; position: absolute; left: 12px; top: 0px; float: left; text-decoration: none; color: black; } #menu {

jQuery code to change position of element on scroll

狂风中的少年 提交于 2021-02-06 12:55:09
问题 I have a bar which includes sharing and social icons. The bar is positioned below post title now like this: <div class="post" id="post-<?php the_ID(); ?>"> <div class="title"> <h1><?php the_title(); ?></h1> </div> <div class="sharelinks"> <ul> <li><a href="https://twitter.com/share" class="twitter-share-button" data-url="<?php the_permalink(); ?>" data-text="<?php the_title(); ?>" data-count="horizontal">Tweet</a></li> <li><div class="fb-like" data-href="<?php the_permalink(); ?>" data-send=

C# get position of a character from string

感情迁移 提交于 2021-02-05 12:21:55
问题 My code is this: string dex = "ABCD1234"; string ch = "C"; string ch1, ch2; if (dex.Contains(ch)) { string n = Convert.ToChar(dex); MessageBox.Show(ch + " is on " + n + " place and is between " + ch1 + " and " + ch2); } I wanted to convert the string into array but i can't do it and i can't retrieve the position of the 'ch' string and what's between it. The output should be: MessageBox.Show("C is on 3rd place and is between B and D"); 回答1: string aS = "ABCDEFGHI"; char ch = 'C'; int idx = aS

C# get position of a character from string

妖精的绣舞 提交于 2021-02-05 12:20:33
问题 My code is this: string dex = "ABCD1234"; string ch = "C"; string ch1, ch2; if (dex.Contains(ch)) { string n = Convert.ToChar(dex); MessageBox.Show(ch + " is on " + n + " place and is between " + ch1 + " and " + ch2); } I wanted to convert the string into array but i can't do it and i can't retrieve the position of the 'ch' string and what's between it. The output should be: MessageBox.Show("C is on 3rd place and is between B and D"); 回答1: string aS = "ABCDEFGHI"; char ch = 'C'; int idx = aS

Calculate position of 3 absolutely positioned elements [duplicate]

无人久伴 提交于 2021-02-05 11:51:29
问题 This question already has answers here : Dynamically arrange some elements around a circle (5 answers) Rotate objects around circle using CSS? (5 answers) Closed 5 months ago . I have a container element with 3 children, all with border-radius set to make them circles. Approx: <div id="rotator"> <div id="a">a</div> <div id="b">b</div> <div id="c">c</div> </div> #rotator { position: relative } #rotator div { position: absolute; border-radius: 50%; } #rotator div#a { top: -20%; left: 30%; }

vb.net unable to Console.SetWindowPosition

旧巷老猫 提交于 2021-02-05 09:56:05
问题 I'm creating a Windows Console application in VB.NET, and I am unable to set the window position relative to the screen. In short, I want a function to centre the window to the screen. I have tried to use Console.SetWindowPosition(w, h) method and Console.WindowTop , Console.WindowLeft properties. When returning the values for WindowTop and WindowLeft , they both return 0, and if I attempt to change these values with Console.WindowLeft = n (n > 0), the program throws an OutOfBounds exception,

WPF Mediaelement.Position is not working

蹲街弑〆低调 提交于 2021-02-04 19:18:45
问题 What I need is to set the Position property on WPF's MediaElement control. But when I play the video, (either via Play() or through some kind of animation on Opacity ) it is is not working at all. It is showing 00:00:00 time, but I would expect it to be set to 00:00:05. I have hard-coded Position value and it is not working at all. Just In case I am going to put all my code I have so u can see the whole animation logic. Any clue? public partial class CrossFadeTransition : UserControl {