Thứ Sáu, 14 tháng 10, 2016

Google Converts Queries Into Questions

I noticed an interesting Google Search experiment in the mobile/tablet interface. When searching for [alcohol with the highest boiling], Google converted my query into a question: "Which alcohol has the highest boiling point?", then it tried to answer the question using a snippet from a web page and then it added a "more results" link. Google's link sent to me to the search results page for the question inferred by Google.

Google's Card for Directions

When you search Google for [directions] or [get directions], you get an error message: "No results for that place. Try entering it below to get suggestions." Google shows a special card for directions with cool features like autocomplete, but the error message is out of place because you haven't typed a location.


Suggestions aren't very smart. For example, I typed "Brisbane, Australia" as the starting point and then I started to type "Mel" as the destination. Google suggested 3 places from California, strictly based on my location, while ignoring that Melbourne is a much better suggestion.


Google shows directions inside the card and you can pick between driving, walking, cycling or using public transportation.


To see the directions, just click the text that describes your favorite route. If there is only one route, pick that one. Another option is to click "directions" and go to the Google Maps site.

Add Home Screen Shortcuts to Google Maps Directions

I'm not sure if this is a new feature, but it must be pretty recent. Google Maps for Android lets you add home screen shortcuts to directions directly from the app. Just search for directions, tap the menu icon and pick "add route to Home screen". This works best when you select the current location, but it's not a requirement.



You may also see this message: "Go here often? Add this route. Tap here to add a Home screen shortcut to this route."


Another option is to add the directions widget, which lets you pick the shortcut name, whether to start turn-by-turn navigation and more.

Thứ Ba, 11 tháng 10, 2016

CSS Rollover Image Effect - Change Image on Hover

Rollover image is a design feature where an image changes when your mouse hovers over it. Think of a light bulb that turns on and off when you move your mouse cursor into that area of a page. When a page is loading, rollover images are preloaded into it to ensure that the rollover effect is displayed quickly.

This used to be implemented using JavaScript, which is fairly easy with just a small amount of script involved. To make rollover images functional, onmouseover and onmouseout attributes are used to a link tag. The code is then added to a blog gadget or into a new post. It proved to have a number of disadvantages, however, which is why many web developers are using a CSS-only method.

css rollover image

How to create a rollover image using CSS

Here is how to implement a rollover image using CSS. Before getting started, we need to have two images ready, one in its initial/static state as well as its rollover state.

The Image

Place both the static and rollover image in one file and make sure that the rollover image is placed on top of the static one. To achieve the rollover effect, we'll write a code to display the static image and crop the hover image, so that only one image state is displayed at a time.

For this tutorial, we'll use the following as a CSS rollover image.

html rollover image

Creating an HTML Anchor Element for our Image

Instead of adding the image file in a <img> tag, we'll display it as a background image of an </a> (anchor) tag. Here's the HTML that we need to add:
<a class="rolloverimage" href="#URL">Rollover Image</a>
Note: if you want to make the image clickable, replace #URL with the url of the webpage where you want the link to point to.

Using CSS to Set a Background Image

To create the mouseover image effect, we'll use the :hover CSS pseudo-class. Then, we'll use the background-position property and set the values to 0 0 to move the background image to the upper left corner which will create the rollover effect.
<style type="text/css">
.rolloverimage{
display: block;
width: 56px;
height: 90px;
background: url('https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEilJu0oTWrof9hrAqEvAzlZr2FCuKTU5pZ8nXZ1jtphlkjDNNgaBXT6LuZsBWvgkEw_Xc1cdeguVYAfOhaeFg4kKEA9RcMGdv0aY0s_MAknSrtYaQ-z3bU7auD2CEhzh07c0gk7MeW8iRaC/s180/rollover-image-light-bulb-on-off.png') bottom;
text-indent: -99999px;
}
.rolloverimage:hover{
background-position: 0 0;
}
</style>
Note: Replace the text in blue with the url of your image file. Please pay attention on the width and height values marked in red, these should be different depending on your file, where the height value is for only one image and not the entire image file!

The result

Hover your mouse cursor over the light bulb to see the rollover image effect in action:

Rollover Image

Adding Rollover Image to Blogger

To add the rollover image as a gadget: copy both the HTML/CSS codes and go to 'Layout', click on the 'Add a Gadget' link > select HTML/JavaScript, then paste the codes in the 'Content' box.

Or, if you want to add it inside one of your posts, when you create a New Post, switch to the 'HTML' tab and paste the codes inside the empty box.

And this is how you make images swap on mouseover using CSS. Enjoy!

Thứ Hai, 10 tháng 10, 2016

Google Color Converter

Google has a special card that's both a color picker and a color converter. For example, you can search for HEX color codes like #123456 and Google shows the color and converts it to other formats: RGB, HSV, HSL, CMYK.  Google's card also shows up when you search for RGB values like rgb(255,0,255). The most interesting feature of the card lets you pick a color interactively.


Other queries that trigger Google's card: RGB to HEX, color picker.

This is not a new feature, but it's worth pointing out that Chrome has its own color picker and converter in the developer tools. Click a color in the styles tab to open the color picker and shift-click a color to convert it to a different format.


{ via Android Police }

Thứ Bảy, 8 tháng 10, 2016

Google Will Shut Down Panoramio

Google intended to discontinue Panoramio back in 2014, shortly after Google Maps Views was launched, but a lot of users complained and Panoramio continued to exist. Now Google announces that Panoramio will become read-only on November 4th and it'll be shut down one year later, in November 2017.


"Today, with photo upload tools in Google Maps and our Local Guides program, we are providing easy ways for you to share your photos with an active and growing community. As such, we've decided to move forward with closing down Panoramio," informs Google. If you've linked your Panoramio account with a Google account, you'll be able to find your photos in Google Album Archive and they'll not use your storage quota. You can also export your photos in Google Takeout.

Google encourages Panoramio users to join the Local Guides program for Google Maps and share photos, add reviews and information about places. "It's all about that warm feeling you get from helping others discover new, enriching experiences. That, and the benefits. Every place you improve on Google Maps gets you closer to unlocking something new - from early access to new products to exclusive contests and events."

If you don't like Google's options, you can delete your Panoramio photos or go to Panoramio's settings page and delete your account.

Google acquired Panoramio in 2007. It was a Spanish startup which had a site that enabled "digital photographers to geolocate, store and organize their photographs and to view those photographs in Google Earth and Google Maps."

More Related Searches in Mobile Google Search

Google's mobile search interface shows a new box with related searches after clicking a result and going back to the search page. There's a list called "people also search for", which shows queries that are related to both the original search and the search result you've previously visited. Swipe left to see the entire the list.


Tap a different search result and you'll get different suggestions:


Google tested this feature back in June and now it's no longer an experiment.