I saw this code in Google Chrome Beta version's new tab where it show the icon if installed tabs.
They are using any technique to resize the images.
this is html of a icon
<div class="app-img-container launch-click-target" title="Box Office" style="height: 97.56981132075472px; width: 97.56981132075472px; ">
<img class="" src="chrome://extension-icon/dhbbohlkjglcppclgngklojecglglinl/128/0">
</div>
and it's css of related classes
.app-img-container {
margin-left: auto;
margin-right: auto;
-webkit-mask-size: 100% 100%;
}
.app-img-container > * {
height: 100%;
width: 100%;
}
Can anyone tell me which method they are using? Is it based on Javascript?
To check this you can install Google Chrome Beta and install some apps from chrome store then open a new tab in chrome. you will se the icons.
Note: it's only works in Beta version
This is the whole source of Tab page which I took from view source http://jsbin.com/ikituc/edit#html
And this is rendred source which i copied from Chrome Developer tools HTML tab http://jsbin.com/ekiqaf/edit#html
I want to know the method which is being used to re-size the icons.
Drag and drop for sorting layouts - Click and hold onto any layout and drag to rearrange order to your liking Highlighted tabs now can be resized - when 2 or more tabs are highlighted, only these tabs will be considered for resizing.
What do you mean by resizable? There is no resizable icon here in Canary. If you mean resizing from small icons to big icons I should say there is two different icons for every app. For example for Angry Birds:
chrome://extension-icon/aknpkdffaafgjchaibgeefbgmgeghloj/16/1
chrome://extension-icon/aknpkdffaafgjchaibgeefbgmgeghloj/128/0
Any other "resize" is because of CSS3 transitions
The method is surely based on javascrip.
If you take a look at the calculateLayout_
method you will understand why :)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With