Karthikeya Boyini has Published 2382 Articles

Usage of background-image property in CSS

karthikeya Boyini

karthikeya Boyini

Updated on 30-Jan-2020 08:55:46

98 Views

The background-image property is used to set the background image of an element.ExampleYou can try to run the following code to learn how to work with the background-image property:                    body {             background-image: url("/latest/inter-process-communication.png");             background-color: #cccccc;          }                      Hello World!          

Set the background color of an element with CSS

karthikeya Boyini

karthikeya Boyini

Updated on 30-Jan-2020 08:51:24

284 Views

To set the background color of an element, use the background-color property.ExampleYou can try to run the following code to learn how to work with the background-color property:                              This text has a blue background color.          

How to use style attribute to define style rules?

karthikeya Boyini

karthikeya Boyini

Updated on 30-Jan-2020 08:23:24

248 Views

You can use style attribute of any HTML element to define style rules. These rules will be applied to that element only. Here is the generic syntax:The following is an example:                   This is inline CSS    

Usage of text-transform property in CSS

karthikeya Boyini

karthikeya Boyini

Updated on 30-Jan-2020 07:59:06

82 Views

The text-transform property is used to capitalize text or convert text to uppercase or lowercase letters.ExamplePossible values are none, capitalize, uppercase, lowercase.                            This will be capitalized                      This will be in uppercase                      This will be in lowercase          

Class Selectors in CSS

karthikeya Boyini

karthikeya Boyini

Updated on 30-Jan-2020 07:53:47

407 Views

You can define style rules based on the class attribute of the elements. All the elements having that class will be formatted according to the defined rule..black {    color: #808000; }This rule renders the content in black for every element with class attribute set to black in our document. ... Read More

Circle Collision Detection HTML5 Canvas

karthikeya Boyini

karthikeya Boyini

Updated on 30-Jan-2020 06:14:28

319 Views

If we want to check whether circles are colliding with each other or not, one way is by getting the distance between two centers of circles and subtracting the radius of each circle from that distanceWe also check if the distance is greater than 1. If we want to check ... Read More

Why should we not use group functions with non-group fields without GROUP BY clause in MySQL SELECT query?

karthikeya Boyini

karthikeya Boyini

Updated on 30-Jan-2020 05:50:13

171 Views

It is because without GROUP BY clause the output returned by MySQL can mislead. We are giving following example on the ‘Student’ table given below, to demonstrate it −mysql> Select * from Student; +------+---------+---------+-----------+ | Id   | Name    | Address | Subject   | +------+---------+---------+-----------+ | 1   ... Read More

Is their a cross-origin attribute in HTML5?

karthikeya Boyini

karthikeya Boyini

Updated on 29-Jan-2020 10:23:18

149 Views

Yes, the official specification states cross-origin attribute as:The crossorigin attribute is a CORS settings attribute. Its purpose is to allow images from third-party sites that allow cross-origin access to be used with canvas.You can use it to solve JavaScript errors like to log js errors:if (securityOrigin()->canRequest(targetUrl)) {    msg = ... Read More

How to draw large font on HTML5 Canvas?

karthikeya Boyini

karthikeya Boyini

Updated on 29-Jan-2020 10:17:56

180 Views

To draw large font properly in HTML5 Canvas, you can try to run the following code:var myCanvas = document.getElementById("myCanvas"); var context = c.getContext("2d"); context.font = '180pt Georgia'; context.strokeStyle = "#FF0000"; context.fillStyle = "#FFFFFF "; context.lineWidth = 34; context.fillText("Demo!",0,200); context.strokeText("Demo!",0,200);

Blending two images with HTML5 canvas

karthikeya Boyini

karthikeya Boyini

Updated on 29-Jan-2020 10:15:17

2K+ Views

To blend, you need to perform blending of two images in proportion 50-50.Let us see how: Blended image    window.onload = function () {       var myImg1 = document.getElementById('myImg1');       var myImg2 = document.getElementById('myImg2');       var myCanvas = document.getElementById("canvas"); ... Read More

Advertisements