Mobile-friendly alternative for rollover as CSS sprite - responsive-design

CSS rollover sprites were cool, but for responsive design we now use images (which are responsive) rather than CSS backgrounds (which are not). Is there an equivalent to CSS sprites for responsive image-based links ? Or, is there only Javascript for switching from normal state image to hover state image when hovering the link ?

As I'm the developer of LazyLou, I can advise you to use it. It's support for responsive page design as well as pre-loading feature. It might help you.

Related

How can I disable lightbox2 on mobile

Just discovered this code and implementation of lightbox2 and added the needed code to some of my webpages.
Looks very good o desktop and also on tablet but I don't like the lightbox in mobile view.
The pictures that are shown on mobile are smaller than the 'normal' responsive view that I get when not using lightbox2.
So my question is in the title: How can I disable the lightbox on mobile?
Regards Arno
Unfortunately this is not possible at this time. The Lightbox script on load will attach event handlers to the target images.
To get around this, you can use different markup on mobile and show hide the content with CSS media queries.

What's the document loader used on Youtube?

I want to use a loader such as the one on Youtube before the content is loaded. On youtube, every piece of content uses a light gray color loader before rendering the actual content. It is made of squares and circles to simulate the actual content about to be rendered.
Do you know what it is ? Surprisingly, I couldn't find it neither on material-ui nor via a google search.
ok, I found the solution to my problem.
What I was looking for is called "placeholder UI", or "skeleton screen".
In my case, I want to use it with ReactJS. Semantic UI React has the placeholder part of the library :
https://react.semantic-ui.com/elements/placeholder/#content-line
Material-UI, and other styling libraries do not. There are however external packages for that, such as :
https://github.com/buildo/react-placeholder
https://github.com/danilowoz/react-content-loader
https://github.com/dvtng/react-loading-skeleton
It's also possible to implement skeleton screens oneself using a combination of html, svg and css.

How to hide fancybox navigation arrows on mobile

I've spent most of the day on this and got nowhere. On a mobile handset the gallery is displayed with the nav arrows superimposed on the image. These are not necessary since swipe is enabled and spoil the look of the image.
I need to hide the arrows for mobile only, is there a recommended way to do this? It seems like a common thing one might want to do, but I can't find anything current on the web.
I've tried some js code to alter the options for the library to no avail, and can't figure out how to do it with a media query to modify the css.
There is an option arrows that you can use to toggle navigation arrows. You could set it by yourself for mobile devices or you can use handy mobile option, like this:
$('[data-fancybox="images"]').fancybox({
mobile : {
arrows: false
}
});

Trying to serve responsive custom code through DFP

We're trying to serve simple markup - a thumbnail, image, and some text - through DFP. This markup needs to be fluid - it's one member of a responsive grid on our website.
Assuming we can't avoid the iframe, is there a way we can get the iframe to be set at 100% width? That would probably do it.
The issues we're having is that we're forced to define an ad unit size, and that seems to dictate the dimensions of the iframe.
You can't have the control over the iframe, the best solution would be to extract the content of the iframe and append it to the parent using javascript. This way you will be able to use your websites responsive grid and class.
Sorry Mathieu but you are wrong. DFP uses friendly iFrames and you can change the width or height if you use your own creative template. We have many custom templates defined in DFP for our masthead variations that can expand, collapse, destroy ad unit's iframe.

Is Bootstrap 3 really responsive by default?

I need to create a new application widget using bootstrap 3 and other web technologies like angular etc. I know that the new version of bootstrap is responsive. My understanding after reading the documentation is that the widget that I will create will automatically be responsive. I don't need to do anything special to make it responsive. However If I want to make it non-responsive then I need to make necessary changes to disable this functionality of bootstrap 3.
Can you please let me know that whether my understanding of Bootstrap in this regard is correct or not?
I think this will help you to understand more about Bootstrap.
You mentioned "widget that I will create will automatically be responsive". But if you not apply Bootstrap CSS rules in your widget, it will not be responsive even it in inside of Bootstrap template.
We have to apply Bootstrap CSS rules in our design to take effect and be responsive. If you do not want a particular element to be responsive, apply your own CSS rules or media queries on breaking points that you want...
Link for Bootstrap CSS http://getbootstrap.com/css/
Hope this will help you. Cheers! (='.'=)
This is all you need to do:
Steps to disable page responsiveness
Omit the viewport mentioned in the CSS docs
Override the width on the .container for each grid tier with a single width, for example width: 970px !important; Be sure that this comes after the default Bootstrap CSS. You can optionally avoid the !important with media queries or some selector-fu.
If using navbars, remove all navbar collapsing and expanding behavior.
For grid layouts, use .col-xs-* classes in addition to, or in place of, the medium/large ones. Don't worry, the extra-small device grid scales to all resolutions.
You'll still need Respond.js for IE8 (since our media queries are still there and need to be processed). This disables the "mobile site" aspects of Bootstrap.
Bootstrap template with responsiveness disabled
We've applied these steps to an example. Read its source code to see the specific changes implemented.
Not Responsive Template: http://getbootstrap.com/examples/non-responsive/

Resources