{"id":6946,"date":"2021-07-22T12:59:07","date_gmt":"2021-07-22T12:59:07","guid":{"rendered":"https:\/\/www.scmgalaxy.com\/tutorials\/?p=6946"},"modified":"2021-07-22T12:59:08","modified_gmt":"2021-07-22T12:59:08","slug":"css-tutorial-css-border-radius","status":"publish","type":"post","link":"https:\/\/www.scmgalaxy.com\/tutorials\/css-tutorial-css-border-radius\/","title":{"rendered":"CSS tutorial (CSS Border-radius)"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\"><strong>CSS border-property:- <\/strong>The css property sets the rounded borders and provides the rounded corners around an element, tag, or div. It defines the radius of the corners of an element. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">It is shorthand for border top-left-radius, border-top-right, border-bottom- right-radius and border-bottom-left-radius. It gives the rounded shape to the corners of the border of an element. We can specify the border for all four corners of the box in a single declaration using the border-radius. The values of this property can be defined in percentage or length units.If the bottom-left value is omitted, then it will be same as the top-right. If the value of bottom-right is eliminated, then it will be same as the top-left. Similarly, if top-right is eliminated, then it will be the same as top-left.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Let&#8217;s see what happens when we provide a single value, two values, three values, and four values to this property.<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>If we provide a single value\u00a0<strong>(<\/strong>such as\u00a0<strong>border-radius: 30px;)<\/strong>\u00a0to this property, it will set all corners to the same value.<\/li><li>When we specify two values\u00a0<strong>(<\/strong>such as\u00a0<strong>border-radius: 20% 10% \ud83d\ude09<\/strong>, then the first value will be used for the top-left and bottom-right corners, and the second value will be used for the top-right and bottom-left corners.<\/li><li>When we use three values\u00a0<strong>(<\/strong>such as\u00a0<strong>border-radius: 10% 30% 20%;)<\/strong>\u00a0then the first value will be used for the top-left corner, the second value will be applied on top-right, and bottom-left corners and the third value will be applied to the bottom-right corner.<\/li><li>Similarly, when this property has four values\u00a0<strong>(border-radius: 10% 30% 20% 40%;)<\/strong>\u00a0then the first value will be the radius of top-left, the second value will be used for the top-right, the third value will be applied on bottom-right, and the fourth value is used for bottom-left.<\/li><\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">example:-<\/p>\n\n\n\n<script src=\"https:\/\/gist.github.com\/shashank969\/cb5254df93252a0e79e9506f91c8fe32.js\"><\/script>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Border-radius for specific corners:-<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">It sets the border radius for the top-left corner.<\/p>\n\n\n\n<script src=\"https:\/\/gist.github.com\/shashank969\/44cc9d7731bbd43aba1cd23fff64e402.js\"><\/script>\n\n\n\n<p class=\"wp-block-paragraph\">Example:- border-top-right-radius<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">It sets the border-radius for the top-right corner.<\/p>\n\n\n\n<script src=\"https:\/\/gist.github.com\/shashank969\/0ad4c18d51d528c17840e15d6b420f89.js\"><\/script>\n\n\n\n<p class=\"wp-block-paragraph\">Example- border-bottom-right-radius<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">It sets the border-radius for the bottom-right corner.<\/p>\n\n\n\n<script src=\"https:\/\/gist.github.com\/shashank969\/5c003b3279268019fb0e54696583658d.js\"><\/script>\n\n\n\n<p class=\"wp-block-paragraph\">Example- border-bottom-left-radius<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">It sets the border-radius for the bottom-left corner.<\/p>\n\n\n\n<script src=\"https:\/\/gist.github.com\/shashank969\/e5c466a69290346013c6af2596898330.js\"><\/script>\n\n\n\n<p class=\"wp-block-paragraph\">We can specify seprate horizontal and vertical values by using the slash(\/) symbol. The values before the slash (\/) is used for the horizontal radius and the values after the slash(\/) are for the vertical radius.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">There is an example given below using the slash(\/) symbol.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Example:-<\/p>\n\n\n\n<script src=\"https:\/\/gist.github.com\/shashank969\/60a66143b304572f2081f1401c1d3e5d.js\"><\/script>\n","protected":false},"excerpt":{"rendered":"<p>CSS border-property:- The css property sets the rounded borders and provides the rounded corners around an element, tag, or div. [&hellip;]<\/p>\n","protected":false},"author":19,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_joinchat":[],"footnotes":""},"categories":[5309],"tags":[5134,4459,886],"class_list":["post-6946","post","type-post","status-publish","format-standard","hentry","category-css","tag-css","tag-html","tag-web-development"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>CSS tutorial (CSS Border-radius) - scmGalaxy<\/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:\/\/www.scmgalaxy.com\/tutorials\/css-tutorial-css-border-radius\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"CSS tutorial (CSS Border-radius) - scmGalaxy\" \/>\n<meta property=\"og:description\" content=\"CSS border-property:- The css property sets the rounded borders and provides the rounded corners around an element, tag, or div. [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.scmgalaxy.com\/tutorials\/css-tutorial-css-border-radius\/\" \/>\n<meta property=\"og:site_name\" content=\"scmGalaxy\" \/>\n<meta property=\"article:published_time\" content=\"2021-07-22T12:59:07+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-07-22T12:59:08+00:00\" \/>\n<meta name=\"author\" content=\"shashank K\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"shashank K\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/css-tutorial-css-border-radius\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/css-tutorial-css-border-radius\\\/\"},\"author\":{\"name\":\"shashank K\",\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/#\\\/schema\\\/person\\\/c88b513657ea9e9a6cd8a9b3a3bff6f3\"},\"headline\":\"CSS tutorial (CSS Border-radius)\",\"datePublished\":\"2021-07-22T12:59:07+00:00\",\"dateModified\":\"2021-07-22T12:59:08+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/css-tutorial-css-border-radius\\\/\"},\"wordCount\":388,\"commentCount\":0,\"keywords\":[\"css\",\"HTML\",\"Web Development\"],\"articleSection\":[\"CSS\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/css-tutorial-css-border-radius\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/css-tutorial-css-border-radius\\\/\",\"url\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/css-tutorial-css-border-radius\\\/\",\"name\":\"CSS tutorial (CSS Border-radius) - scmGalaxy\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/#website\"},\"datePublished\":\"2021-07-22T12:59:07+00:00\",\"dateModified\":\"2021-07-22T12:59:08+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/#\\\/schema\\\/person\\\/c88b513657ea9e9a6cd8a9b3a3bff6f3\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/css-tutorial-css-border-radius\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/css-tutorial-css-border-radius\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/css-tutorial-css-border-radius\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"CSS tutorial (CSS Border-radius)\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/#website\",\"url\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/\",\"name\":\"scmGalaxy\",\"description\":\"A Platform for Software Engineers\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/#\\\/schema\\\/person\\\/c88b513657ea9e9a6cd8a9b3a3bff6f3\",\"name\":\"shashank K\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/a1d7da7c43d650339f6ab219ed52f462ee8ce994ce0d45b50c0700eead0676a4?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/a1d7da7c43d650339f6ab219ed52f462ee8ce994ce0d45b50c0700eead0676a4?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/a1d7da7c43d650339f6ab219ed52f462ee8ce994ce0d45b50c0700eead0676a4?s=96&d=mm&r=g\",\"caption\":\"shashank K\"},\"url\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/author\\\/shashank\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"CSS tutorial (CSS Border-radius) - scmGalaxy","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:\/\/www.scmgalaxy.com\/tutorials\/css-tutorial-css-border-radius\/","og_locale":"en_US","og_type":"article","og_title":"CSS tutorial (CSS Border-radius) - scmGalaxy","og_description":"CSS border-property:- The css property sets the rounded borders and provides the rounded corners around an element, tag, or div. [&hellip;]","og_url":"https:\/\/www.scmgalaxy.com\/tutorials\/css-tutorial-css-border-radius\/","og_site_name":"scmGalaxy","article_published_time":"2021-07-22T12:59:07+00:00","article_modified_time":"2021-07-22T12:59:08+00:00","author":"shashank K","twitter_card":"summary_large_image","twitter_misc":{"Written by":"shashank K","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.scmgalaxy.com\/tutorials\/css-tutorial-css-border-radius\/#article","isPartOf":{"@id":"https:\/\/www.scmgalaxy.com\/tutorials\/css-tutorial-css-border-radius\/"},"author":{"name":"shashank K","@id":"https:\/\/www.scmgalaxy.com\/tutorials\/#\/schema\/person\/c88b513657ea9e9a6cd8a9b3a3bff6f3"},"headline":"CSS tutorial (CSS Border-radius)","datePublished":"2021-07-22T12:59:07+00:00","dateModified":"2021-07-22T12:59:08+00:00","mainEntityOfPage":{"@id":"https:\/\/www.scmgalaxy.com\/tutorials\/css-tutorial-css-border-radius\/"},"wordCount":388,"commentCount":0,"keywords":["css","HTML","Web Development"],"articleSection":["CSS"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.scmgalaxy.com\/tutorials\/css-tutorial-css-border-radius\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.scmgalaxy.com\/tutorials\/css-tutorial-css-border-radius\/","url":"https:\/\/www.scmgalaxy.com\/tutorials\/css-tutorial-css-border-radius\/","name":"CSS tutorial (CSS Border-radius) - scmGalaxy","isPartOf":{"@id":"https:\/\/www.scmgalaxy.com\/tutorials\/#website"},"datePublished":"2021-07-22T12:59:07+00:00","dateModified":"2021-07-22T12:59:08+00:00","author":{"@id":"https:\/\/www.scmgalaxy.com\/tutorials\/#\/schema\/person\/c88b513657ea9e9a6cd8a9b3a3bff6f3"},"breadcrumb":{"@id":"https:\/\/www.scmgalaxy.com\/tutorials\/css-tutorial-css-border-radius\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.scmgalaxy.com\/tutorials\/css-tutorial-css-border-radius\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.scmgalaxy.com\/tutorials\/css-tutorial-css-border-radius\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.scmgalaxy.com\/tutorials\/"},{"@type":"ListItem","position":2,"name":"CSS tutorial (CSS Border-radius)"}]},{"@type":"WebSite","@id":"https:\/\/www.scmgalaxy.com\/tutorials\/#website","url":"https:\/\/www.scmgalaxy.com\/tutorials\/","name":"scmGalaxy","description":"A Platform for Software Engineers","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.scmgalaxy.com\/tutorials\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.scmgalaxy.com\/tutorials\/#\/schema\/person\/c88b513657ea9e9a6cd8a9b3a3bff6f3","name":"shashank K","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/a1d7da7c43d650339f6ab219ed52f462ee8ce994ce0d45b50c0700eead0676a4?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/a1d7da7c43d650339f6ab219ed52f462ee8ce994ce0d45b50c0700eead0676a4?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/a1d7da7c43d650339f6ab219ed52f462ee8ce994ce0d45b50c0700eead0676a4?s=96&d=mm&r=g","caption":"shashank K"},"url":"https:\/\/www.scmgalaxy.com\/tutorials\/author\/shashank\/"}]}},"_links":{"self":[{"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/posts\/6946","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/users\/19"}],"replies":[{"embeddable":true,"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/comments?post=6946"}],"version-history":[{"count":1,"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/posts\/6946\/revisions"}],"predecessor-version":[{"id":6969,"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/posts\/6946\/revisions\/6969"}],"wp:attachment":[{"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/media?parent=6946"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/categories?post=6946"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/tags?post=6946"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}