responsive-design

UWP/WinRT: How to use VisualState Triggers to change the styling of all controls of a certain type?

巧了我就是萌 提交于 2019-12-24 17:28:04
问题 In my UWP app, I have a series of AppBarButtons separated by AppBarSeparators . When the window size drops below a certain amount, I want to hide the AppBarSeparators to save space. I tried something like this, but it didn't work: <VisualState.Setters> <Setter Target="AppBarSeparator" Value="Collapsed"/> </VisualState.Setters> I understand it's not possible to give each of the AppBarSeparators labels so I can target them directly, because they are dynamically generated as part of a binding.

Responsive designing with JavaScript

谁说我不能喝 提交于 2019-12-24 17:12:52
问题 I've finished designing a web site and now I'd love to make it responsive, I just need to make it responsive for PCs as much can't be done on mobiles using the site. I'm just wondering how the iCloud guys do that, when you re-size the window, all the elements positioning and re-sizing by itself nicely, are they using pure CSS or mixture of both CSS and JS? iCloud I found many tutorials but still couldn't figure out why it won't work for me. http://unstoppablerobotninja.com/demos/resize/ my

Fixed sidebar with Skeleton responsive layout

北战南征 提交于 2019-12-24 16:53:35
问题 I have a simple two column responsive design with Skeleton boilerplate. For the sidebar I have this div , inside a container div : <div class="container"> <div class="four columns"> /* logo and menu */ </div> <div class="nine columns post"> /* contents... */ </div> </div> I like the way it looks in wide viewports and how it's stacked on narrower ones, but I'd like to have the sidebar ( four columns div ) in the wider sizes always fixed at the left, while scrolling the content of the other div

Retain aspect ratio for full height responsive image in Chrome

℡╲_俬逩灬. 提交于 2019-12-24 16:12:08
问题 I've set an image to max-height:100%; of the browser window (with a small padding at the bottom), centred on the page. Currently, I'm having problems keeping the aspect ratio of the image from squashing when the browser is resized (interestingly it shows at the correct aspect ratio when refreshed after a resize). I've set up an example in codepen. Would appreciate any advice on how to keep the ratio correct. http://cdpn.io/sHJhl UPDATE 18/08: I've updated the code in the copepen above. It's

Bootstrap responsive column layout stacking columns

这一生的挚爱 提交于 2019-12-24 15:38:56
问题 I'm building a grid structure and I have changed the bootstrap container classes to new dimension which is working fine. I am currently trying to achieve the layout below and have gotten this far. Each column has a background image. I am trying to put another col-md-3 in the black section but have had no luck. Any suggestions? My HTML <div class="container"> <div class="row"> <div class="col-sm-6 col-sx-6 col-md-3 col-lg-3 boats-row"> </div> <div class="col-md-3 home-row-red"> </div> <div

Output img.currentSrc of srcset using jQuery

你。 提交于 2019-12-24 14:56:58
问题 I need to output the current source of an image using a jQuery alert: alert($('.someclass img').attr('currentSrc')); ...however the alert is outputting undefined. For reference, the mark-up is as follows: <div class="someclass"> <img srcset="http://example.com/A.png, http://example.com/A@2x.png 2x"> </div> 回答1: currentSrc is a property not an attribute. Use .prop('currentSrc') $(function() { console.log($("img").prop("currentSrc")); }); <script src="https://ajax.googleapis.com/ajax/libs

Responsive Site Not Working on iPad

╄→尐↘猪︶ㄣ 提交于 2019-12-24 14:16:35
问题 I'm in the process of creating my own framework and have been looking at other boilerplates to see how it is done. I'm currently looking at this bare bones stylesheet and was wondering why it seems to act responsive when you resize the browser, but when I open it on my iPhone or iPad it displays the full screen version of the site. Sorry if this is noob question, I'm still trying to wrap my head around media queries (no pun intended). Thanks in advance. UPDATE: Silly me, I forgot to add the

Change position of an element - responsive website

泄露秘密 提交于 2019-12-24 14:06:18
问题 How can i change the position of an element from being left to being right in a smaller screen? This is for wider screens: .nav { position:absolute; top: 0px; left: 5%; } and i would like to position it right:10px for the smaller screen. Thanks. =========================================================== I made a jsfiddle link: http://jsfiddle.net/romullus/5u64M/ =========================================================== 回答1: You can set the break points this way(assuming 600 px is the

How to set Zoom % for Certain Browers in HTML?

雨燕双飞 提交于 2019-12-24 13:28:28
问题 In web design, is it possible to automatically set a Zoom % for users based on their web browser? For instance, a website opened in Opera with 100% Zoom may not look the same if it was opened in Chrome at the same 100% Zoom. However, the website at 100% Opera scales identically with Chrome at 125% Zoom. Is there a way to set Zoom views? Am I being confused with view-port? 回答1: Well it's considered not good, but in rare cases that you want to increase the scale of an element you can do

Twitter Boostrap responsive navbar issue with search form when collapsed

为君一笑 提交于 2019-12-24 13:26:13
问题 I am using the bootstrap responsive navbar to collapse links in the navbar when the screen is smaller. I want to keep a button and a search box out of the collapsed area though. This is my code: <div class="navbar navbar-inverse navbar-fixed-top"> <div class="navbar-inner"> <div class="container-fluid"> <a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse"> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </a> <a class="brand"