background preloader

CSS Reference

CSS Reference
Related:  html/css

Немного об интерфейсах в .Net (по мотивам одного интервью) В прошедний понедельник мне посчастливилось попасть на собеседование на Senior .Net Developer в одну международную компанию. Во время собеседования мне предложили пройти тест, где ряд вопросов был связан с .Net. В частности в одном из вопросов надо было дать оценку (истина/ложь) ряду утверждений, среди которых было и такое: В .Net любой массив элементов, например int[], по умолчанию реализует IList, что позволяет использовать его в качестве коллекции в операторе foreach. Быстро ответив на этот вопрос отрицательно и отдельно дописав на полях. что для foreach необходима реализация не IList, а IEnumerable, я перешел к следующему вопросу. Про IList я смутно помнил, что этот интерфейс дает мне IEnumerable, индексатор и свойство Count, содержащее число элементов коллекции, а также еще пару редко используемых свойств, типа IsFixedCollection(). Класс System.Array var v = new int[] { 1, 2, 3 }; var t = v.GetType(); var i = t.GetInterfaces(); foreach(var tp in i) Console.WriteLine(tp.Name); 2.

CSS Tutorial Object Oriented CSS · stubbornella/oocss Wiki How nth-child Works There is a CSS selector, really a pseudo-selector, called nth-child. Here is an example of using it: What the above CSS does, is select every third list item inside unordered lists. That is, the 3rd, 6th, 9th, 12th, etc. But how does that work? And what other kinds of things can you do with nth-child? It boils down to what is in between those parentheses. nth-child accepts two keywords in that spot: even and odd. As seen in the first example, nth-child also accepts expressions in between those parentheses. Let's get back to the "3n+3" from the original example though. (3 x 0) + 3 = 3 = 3rd Element (3 x 1) + 3 = 6 = 6th Element (3 x 2) + 3 = 9 = 9th Element etc. How about the :nth-child(2n+1)? (2 x 0) + 1 = 1 = 1st Element (2 x 1) + 1 = 3 = 3rd Element (2 x 2) + 1 = 5 = 5th Element etc. Hey wait! (3 x 0) = 0 = no match (3 x 1) = 3 = 3rd Element (3 x 2) = 6 = 6th Element (3 x 3) = 9 = 9th Element etc. So as you can see, the matches are exactly the same, no need for the "+3". Share On

CustomSortOrder in SharePoint 2010 TermSets | Andrea Ramacciotti Blog's Be careful in using CustomSortOrder in SharePoint 2010 TermSets! TermSets terms can be ordered in custom way using the specific user inteface feature in Site Settings -> Term Store Management. That can be also used in code because Term class expose the CustomSortOrder property that’s a string where are listed all the term CLSID separated by “:”. Which is the problem? you remove one or more items, in the CustomSortOrder property still remains their CLSID. Be careful! Mi piace: Mi piace Caricamento... Galleria Questa voce è stata pubblicata in Computer e Internet, Sharepoint e contrassegnata con Sharepoint.

Mettre en place le CSS Ce que je vous ai montré jusqu'ici a quand même un défaut : cela implique par exemple que TOUS les paragraphes possèdent la même présentation (ici, ils seront donc tous écrits en bleu). Comment faire pour que certains paragraphes seulement soient écrits d'une manière différente ? On pourrait placer le code CSS dans un attributstylesur la balise que l'on vise (c'est la technique que je vous ai présentée un peu plus tôt) mais, comme je vous l'ai dit, ce n'est pas recommandé (il vaut mieux utiliser un fichier CSS externe). Pour résoudre le problème, on peut utiliser ces attributs spéciaux qui fonctionnent sur toutes les balises : l'attributclass;l'attributid. Que les choses soient claires dès le début : les attributsclassetidsont quasiment identiques. Comme je viens de vous le dire, c'est un attribut que l'on peut mettre sur n'importe quelle balise, aussi bien titre que paragraphe, image, etc. Oui mais que met-on comme valeur à l'attributclass? <! Quel intérêt ? Les balises universelles

CSS Style Guides As we wrap up our recent poll on ordering CSS properties, it brings up the larger issue of CSS style guides. Ordering properties is just one choice you have to make that makes up a complete styling strategy. Naming is a part of it. Sectioning is a part of it. Commenting, indentation, overall file structure... it all makes up a complete CSS style guide. Let's round up some existing ones. But first... I love pattern libraries. The List I'll list some excerpts from each that I like below. GitHub GitHub CSS Style Guide → As a rule of thumb, don't nest further than 3 levels deep. Unit-less line-height is preferred because it does not inherit a percentage value of its parent element, but instead is based on a multiplier of the font-size. Google Google HTML/CSS Style Guide → Use ID and class names that are as short as possible but as long as necessary. E.g. E.g. .demo-image not .demoimage or .demo_image Idiomatic CSS Nicolas Gallagher's Idiomatic CSS → Configure your editor to "show invisibles". ThinkUp

12 Fun CSS Text Shadows You Can Copy and Paste Typography is everyone’s favorite toy in web design. One particularly fun tool that CSS gives you to play with your type is text-shadow, which seems simple enough at first but can be used to create some remarkable effects with a little ingenuity and creativity. Today we’re going to run through several text-shadow examples that you can copy and paste for your own work. The Basic Shadow The text-shadow property is super easy to work with and works well across all modern browsers without even so much as a vendor prefix! Syntax The syntax for creating a simple text-shadow is shown below. text-shadow: horizontal-offset vertical-offset blur color; Putting this into action, here’s an example with a shadow that has been moved down two pixels and right four pixels with a three pixel blur and a color of black at 30% opacity. text-shadow: 2px 4px 3px rgba(0,0,0,0.3); Here’s the result of this code, a nice simple shadow that is quite appealing all by itself. Why rgba? Quick and Dirty Letterpress Hard Shadow

Ewen's Files, Ewen Elder; jQuery JavaScript PHP CSS xHTML MySQL Developer Setting the fixed width of a <select> element in Internet Explorer will cause all of the select options that are wider than the select's set width to be cropped. This jQuery plugin proposes a work around. Applying this plugin makes the select element in Internet Explorer appear to work as it would work in Firefox, Opera etc... As of 17th June 2010, it is confirmed to work in Internet Explorer versions 6, 7 and 8. This plugin adds three additional elements to the DOM; a <span> element that acts as the select container; an <a> element that acts as an overlay; and another <span> element within the <a> element that adds the visual part. Class names representing the browser version and which state the select is in are added to the container and the the overlay. For Internet Explorer 6, you should also use the bgiframe plugin. View the page source to see how to use this jQuery plugin. Contact me here with any queries or bug reports etc.

CSS (Feuilles de style) Septembre 2016 Cours CSS Le concept de feuilles de style est apparu en 1996 avec la publication par le W3C d'une nouvelle recommandation intitulée « Cascading StyleSheets » (feuilles de style en cascade), notée CSS. Le principe des feuilles de style consiste à regrouper dans un même document des caractéristiques de mise en forme associées à des groupes d'éléments. Les feuilles de style ont été mises au point afin de compenser les manques du langage HTML en ce qui concerne la mise en page et la présentation. Elles sont appellées « feuilles de style en cascade » (en anglais « Cascading Style Sheets ») car il est possible d'en définir plusieurs et que les styles peuvent être hérités en cascade. Les feuilles de style permettent notamment : La recommandation CSS2, développé à partir de 1997, apporte un grand nombre de nouvelles fonctionnalités par rapport à la précédente norme (1.0), parmi lesquelles : La recommandation CSS4 est en cours d'écriture au W3C depuis 2010. Compatibilité des navigateurs

CSS Specificity Some people are confused by CSS Specificity, especially with all of the (not-so) new CSS3 Selectors. The image below may help make sense of CSS Specificity. Download the PDF Legend: X-0-0: The number of ID selectors, represented by Sharks0-Y-0: The number of class selectors, attributes selectors, and pseudo-classes, represented by Fish 0-0-Z: The number of type selectors and pseudo-elements, represented by Plankton a la Spongebob*: The universal selector has no value +, >, ~: combinators, although they allow for more specific targeting of elements, they do not increase specificity values:not(x): The negation selector has no value, but the argument passed increases specificity CSS SpeciFISHity You can download the PDF of fishy CSS specificity here Specificity determines which CSS property declaration is applied when two or more declarations apply to the same element with competing property declarations. With CSS3 Selectors, order is even more important, as is understanding specificity: !

Selectutorial: CSS selectors Selectutorial - CSS selectors Selectutorial - CSS selectors Selectors are one of the most important aspects of CSS as they are used to "select" elements on an HTML page so that they can be styled. Find out more about selectors including the structure of rules, the document tree, types of selectors and their uses. Rules The document tree - it's a family thing Selectors Advanced stuff Selectors in action - a step by step tutorial Max Design Feeds Recent articles Popular articles Other Max Design articles and presentations Associated with webstandardsgroup.org

Related: