{"id":293,"date":"2019-01-23T20:22:42","date_gmt":"2019-01-23T18:22:42","guid":{"rendered":"http:\/\/tutorial.bernatcortina.cat\/?page_id=293"},"modified":"2019-01-23T20:22:42","modified_gmt":"2019-01-23T18:22:42","slug":"border","status":"publish","type":"page","link":"https:\/\/tutorial.bernatcortina.cat\/index.php\/css\/border\/","title":{"rendered":"Border"},"content":{"rendered":"<h1 style=\"text-align: justify;\">Model de caixes CSS<\/h1>\n<p style=\"text-align: justify;\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-278\" src=\"http:\/\/tutorial.bernatcortina.cat\/wp-content\/uploads\/2019\/01\/1-75.png\" alt=\"\" width=\"883\" height=\"831\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-279\" src=\"http:\/\/tutorial.bernatcortina.cat\/wp-content\/uploads\/2019\/01\/1-76.png\" alt=\"\" width=\"737\" height=\"564\" \/><\/p>\n<h1 style=\"text-align: justify;\">Border<\/h1>\n<p style=\"text-align: justify;\">El CSS permet modificar l\u2019aspecte de cada un de les quatre vores de la caixa d\u2019un element. Per cada vora es pot establir la seva <strong>amplada o gruix, color i estil<\/strong>. En total CSS defineix m\u00e9s de 20 propietats relacionades amb les vores.<\/p>\n<h2 style=\"text-align: justify;\">Amplada<\/h2>\n<p style=\"text-align: justify;\">L\u2019amplada de les vores es controla amb les quatre proietats: <strong>border-top-width, border-right-width, border-bottom-width, border-left-width<\/strong>.<\/p>\n<p style=\"text-align: justify;\">L\u2019amplada de les vores s\u2019indica mitjan\u00e7ant una unitat de mesura. L\u2019unitat de mesura m\u00e9s habitual \u00e9s el p\u00edxel, ja que permet un control m\u00e9s prec\u00eds sobre el gruix.<\/p>\n<p style=\"text-align: justify;\"><em>Exemple: quatre mesures diferents de vora: <img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-294\" src=\"http:\/\/tutorial.bernatcortina.cat\/wp-content\/uploads\/2019\/01\/1-87.png\" alt=\"\" width=\"864\" height=\"137\" \/><br \/>\n<\/em><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-295\" src=\"http:\/\/tutorial.bernatcortina.cat\/wp-content\/uploads\/2019\/01\/1-88.png\" alt=\"\" width=\"379\" height=\"181\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-296\" src=\"http:\/\/tutorial.bernatcortina.cat\/wp-content\/uploads\/2019\/01\/1-89.png\" alt=\"\" width=\"491\" height=\"202\" \/><\/p>\n<p style=\"text-align: justify;\">Si es vol establir de forma simult\u00e0nia les quatre propietats, podem fer-ho mitjan\u00e7ant <strong>border-width<\/strong>.<\/p>\n<ul style=\"text-align: justify;\">\n<li><strong>Un<\/strong> sol valor, aquest s\u2019aplica a les quatre vores.<\/li>\n<li><strong>Dos<\/strong> valors, el primer s\u2019aplica a la vora superior i inferior, i el segon a l\u2019esquerra i dreta.<\/li>\n<li><strong>Tres<\/strong> valors, el primer s\u2019aplica a la vora superior, el segon a les vores esquerra i dreta i el tercer valor a la vora inferior.<\/li>\n<li><strong>Quatre<\/strong> valors, l\u2019ordre \u00e9s: superior, dreta, inferior, esquerra.<\/li>\n<\/ul>\n<h2 style=\"text-align: justify;\">Color<\/h2>\n<p style=\"text-align: justify;\">El color de les vores es controla amb les quatre propietats: <strong>border-top-color, border-right-color, border-bottom-color, border-left-color.<\/strong><\/p>\n<p style=\"text-align: justify;\">De la mateixa manera que amb l\u2019amplada, podem indicar d\u2019un a quatre valors i les regles d\u2019aplicaci\u00f3 s\u00f3n les mateixes que la propietat <strong>border-width<\/strong>, en aquest cas per\u00f2 la propietat ser\u00e0 <strong>border-color<\/strong>.<\/p>\n<p style=\"text-align: justify;\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-297\" src=\"http:\/\/tutorial.bernatcortina.cat\/wp-content\/uploads\/2019\/01\/1-90.png\" alt=\"\" width=\"420\" height=\"179\" \/><\/p>\n<p style=\"text-align: justify;\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-298\" src=\"http:\/\/tutorial.bernatcortina.cat\/wp-content\/uploads\/2019\/01\/1-91.png\" alt=\"\" width=\"435\" height=\"195\" \/><\/p>\n<h2 style=\"text-align: justify;\">Estil<\/h2>\n<p style=\"text-align: justify;\">El CSS permet establir l\u2019estil de cada una de les vores mitjan\u00e7ant les propietats: <strong>border-top-style, border-right-style, border-bottom-style, border-left-style<\/strong>.<\/p>\n<p style=\"text-align: justify;\">Per establir de forma simult\u00e0nia els estils de totes les vores d\u2019una caixa, \u00e9s necessari utilitzar la propietat \u201cshorthand\u201d anomenada <strong>border-style.<\/strong><\/p>\n<p style=\"text-align: justify;\">L\u2019estil de les vores nom\u00e9s es pot indicar mitjan\u00e7ant els seg\u00fcents valors: <strong>none, hiden, dotted, dashed, solid, double, groove, ridge, inset, outset, inherit<\/strong>.<\/p>\n<p style=\"text-align: justify;\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-299\" src=\"http:\/\/tutorial.bernatcortina.cat\/wp-content\/uploads\/2019\/01\/1-92.png\" alt=\"\" width=\"899\" height=\"725\" \/><\/p>\n<h2 style=\"text-align: justify;\">Propietats shorthand<\/h2>\n<p style=\"text-align: justify;\">Igual que passa amb els marges (<strong>margin<\/strong>) i el farcit (o emplenament, <strong>padding<\/strong>), el CSS defineix una s\u00e8rie de propietats tipus \u201cshorthand\u201d que <strong>permet establir tots els atributs de les vores de forma simult\u00e0nia<\/strong>. El CSS compr\u00e8n una propietat \u201cshorthand\u201d per a cada una de les quatre vores i una <strong>propietat \u201cshorhand\u201d global<\/strong>.<\/p>\n<p style=\"text-align: justify;\">Les propietats s\u00f3n: <strong>border-top, border-right, border-bottom, border-left.<\/strong><\/p>\n<p style=\"text-align: justify;\"><em>Exemple<\/em>.<\/p>\n<p style=\"text-align: justify;\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-300\" src=\"http:\/\/tutorial.bernatcortina.cat\/wp-content\/uploads\/2019\/01\/1-93.png\" alt=\"\" width=\"852\" height=\"152\" \/><\/p>\n<p style=\"text-align: justify;\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-301\" src=\"http:\/\/tutorial.bernatcortina.cat\/wp-content\/uploads\/2019\/01\/Captura-de-Pantalla-2019-01-23-a-les-19.21.01.png\" alt=\"\" width=\"1382\" height=\"222\" \/><\/p>\n<p style=\"text-align: justify;\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-302\" src=\"http:\/\/tutorial.bernatcortina.cat\/wp-content\/uploads\/2019\/01\/Captura-de-Pantalla-2019-01-23-a-les-19.21.08.png\" alt=\"\" width=\"1384\" height=\"260\" \/><\/p>\n<p style=\"text-align: justify;\">La propietat \u201cshorthand\u201d global per establir el valor de tots els atributs de totes les vores de forma directa \u00e9s: <strong>border<\/strong>.<\/p>\n<p style=\"text-align: justify;\"><em>Exemple<\/em>: <img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-303\" src=\"http:\/\/tutorial.bernatcortina.cat\/wp-content\/uploads\/2019\/01\/Captura-de-Pantalla-2019-01-23-a-les-19.22.07.png\" alt=\"\" width=\"1344\" height=\"600\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Model de caixes CSS Border El CSS permet modificar l\u2019aspecte de cada un de les quatre vores de la caixa d\u2019un element. Per cada vora es pot establir la seva amplada o gruix, color i estil. En total CSS defineix m\u00e9s de 20 propietats relacionades amb les vores. Amplada L\u2019amplada de les vores es controla &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/tutorial.bernatcortina.cat\/index.php\/css\/border\/\" class=\"more-link\">Continua llegint <span class=\"screen-reader-text\">\u00abBorder\u00bb<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"parent":223,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"class_list":["post-293","page","type-page","status-publish","hentry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v25.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Border | HTML &amp; CSS<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/tutorial.bernatcortina.cat\/index.php\/css\/border\/\" \/>\n<meta property=\"og:locale\" content=\"ca_ES\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Border | HTML &amp; CSS\" \/>\n<meta property=\"og:description\" content=\"Model de caixes CSS Border El CSS permet modificar l\u2019aspecte de cada un de les quatre vores de la caixa d\u2019un element. Per cada vora es pot establir la seva amplada o gruix, color i estil. En total CSS defineix m\u00e9s de 20 propietats relacionades amb les vores. Amplada L\u2019amplada de les vores es controla &hellip; Continua llegint \u00abBorder\u00bb\" \/>\n<meta property=\"og:url\" content=\"https:\/\/tutorial.bernatcortina.cat\/index.php\/css\/border\/\" \/>\n<meta property=\"og:site_name\" content=\"HTML &amp; CSS\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/bernatcortina\" \/>\n<meta property=\"og:image\" content=\"http:\/\/tutorial.bernatcortina.cat\/wp-content\/uploads\/2019\/01\/1-75.png\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:site\" content=\"@bernatcortina\" \/>\n<meta name=\"twitter:label1\" content=\"Temps estimat de lectura\" \/>\n\t<meta name=\"twitter:data1\" content=\"2 minuts\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/tutorial.bernatcortina.cat\/index.php\/css\/border\/\",\"url\":\"https:\/\/tutorial.bernatcortina.cat\/index.php\/css\/border\/\",\"name\":\"Border | HTML &amp; CSS\",\"isPartOf\":{\"@id\":\"https:\/\/tutorial.bernatcortina.cat\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/tutorial.bernatcortina.cat\/index.php\/css\/border\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/tutorial.bernatcortina.cat\/index.php\/css\/border\/#primaryimage\"},\"thumbnailUrl\":\"http:\/\/tutorial.bernatcortina.cat\/wp-content\/uploads\/2019\/01\/1-75.png\",\"datePublished\":\"2019-01-23T18:22:42+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/tutorial.bernatcortina.cat\/index.php\/css\/border\/#breadcrumb\"},\"inLanguage\":\"ca\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/tutorial.bernatcortina.cat\/index.php\/css\/border\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"ca\",\"@id\":\"https:\/\/tutorial.bernatcortina.cat\/index.php\/css\/border\/#primaryimage\",\"url\":\"http:\/\/tutorial.bernatcortina.cat\/wp-content\/uploads\/2019\/01\/1-75.png\",\"contentUrl\":\"http:\/\/tutorial.bernatcortina.cat\/wp-content\/uploads\/2019\/01\/1-75.png\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/tutorial.bernatcortina.cat\/index.php\/css\/border\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Inici\",\"item\":\"https:\/\/tutorial.bernatcortina.cat\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Protegit: CSS\",\"item\":\"https:\/\/tutorial.bernatcortina.cat\/index.php\/css\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Border\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/tutorial.bernatcortina.cat\/#website\",\"url\":\"https:\/\/tutorial.bernatcortina.cat\/\",\"name\":\"HTML &amp; CSS\",\"description\":\"Fonaments d&#039;HTML i full d&#039;estils\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/tutorial.bernatcortina.cat\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"ca\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Border | HTML &amp; CSS","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/tutorial.bernatcortina.cat\/index.php\/css\/border\/","og_locale":"ca_ES","og_type":"article","og_title":"Border | HTML &amp; CSS","og_description":"Model de caixes CSS Border El CSS permet modificar l\u2019aspecte de cada un de les quatre vores de la caixa d\u2019un element. Per cada vora es pot establir la seva amplada o gruix, color i estil. En total CSS defineix m\u00e9s de 20 propietats relacionades amb les vores. Amplada L\u2019amplada de les vores es controla &hellip; Continua llegint \u00abBorder\u00bb","og_url":"https:\/\/tutorial.bernatcortina.cat\/index.php\/css\/border\/","og_site_name":"HTML &amp; CSS","article_publisher":"https:\/\/www.facebook.com\/bernatcortina","og_image":[{"url":"http:\/\/tutorial.bernatcortina.cat\/wp-content\/uploads\/2019\/01\/1-75.png","type":"","width":"","height":""}],"twitter_card":"summary_large_image","twitter_site":"@bernatcortina","twitter_misc":{"Temps estimat de lectura":"2 minuts"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/tutorial.bernatcortina.cat\/index.php\/css\/border\/","url":"https:\/\/tutorial.bernatcortina.cat\/index.php\/css\/border\/","name":"Border | HTML &amp; CSS","isPartOf":{"@id":"https:\/\/tutorial.bernatcortina.cat\/#website"},"primaryImageOfPage":{"@id":"https:\/\/tutorial.bernatcortina.cat\/index.php\/css\/border\/#primaryimage"},"image":{"@id":"https:\/\/tutorial.bernatcortina.cat\/index.php\/css\/border\/#primaryimage"},"thumbnailUrl":"http:\/\/tutorial.bernatcortina.cat\/wp-content\/uploads\/2019\/01\/1-75.png","datePublished":"2019-01-23T18:22:42+00:00","breadcrumb":{"@id":"https:\/\/tutorial.bernatcortina.cat\/index.php\/css\/border\/#breadcrumb"},"inLanguage":"ca","potentialAction":[{"@type":"ReadAction","target":["https:\/\/tutorial.bernatcortina.cat\/index.php\/css\/border\/"]}]},{"@type":"ImageObject","inLanguage":"ca","@id":"https:\/\/tutorial.bernatcortina.cat\/index.php\/css\/border\/#primaryimage","url":"http:\/\/tutorial.bernatcortina.cat\/wp-content\/uploads\/2019\/01\/1-75.png","contentUrl":"http:\/\/tutorial.bernatcortina.cat\/wp-content\/uploads\/2019\/01\/1-75.png"},{"@type":"BreadcrumbList","@id":"https:\/\/tutorial.bernatcortina.cat\/index.php\/css\/border\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Inici","item":"https:\/\/tutorial.bernatcortina.cat\/"},{"@type":"ListItem","position":2,"name":"Protegit: CSS","item":"https:\/\/tutorial.bernatcortina.cat\/index.php\/css\/"},{"@type":"ListItem","position":3,"name":"Border"}]},{"@type":"WebSite","@id":"https:\/\/tutorial.bernatcortina.cat\/#website","url":"https:\/\/tutorial.bernatcortina.cat\/","name":"HTML &amp; CSS","description":"Fonaments d&#039;HTML i full d&#039;estils","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/tutorial.bernatcortina.cat\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"ca"}]}},"_links":{"self":[{"href":"https:\/\/tutorial.bernatcortina.cat\/index.php\/wp-json\/wp\/v2\/pages\/293","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/tutorial.bernatcortina.cat\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/tutorial.bernatcortina.cat\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/tutorial.bernatcortina.cat\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/tutorial.bernatcortina.cat\/index.php\/wp-json\/wp\/v2\/comments?post=293"}],"version-history":[{"count":0,"href":"https:\/\/tutorial.bernatcortina.cat\/index.php\/wp-json\/wp\/v2\/pages\/293\/revisions"}],"up":[{"embeddable":true,"href":"https:\/\/tutorial.bernatcortina.cat\/index.php\/wp-json\/wp\/v2\/pages\/223"}],"wp:attachment":[{"href":"https:\/\/tutorial.bernatcortina.cat\/index.php\/wp-json\/wp\/v2\/media?parent=293"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}