
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Found 598 Articles for Front End Scripts

835 Views
To convert HTML5 canvas to PNG, follow the below-given steps −You need to add the generated data URL to the href attribute of an tag.Dialog for base64 image −Add a filename −Now define http headers −headers=Content-Disposition: attachment; filename=newimg.pngTo deal with the RAM of the web browser and make its utilization less −// generated the data URL dynamically function myCanvas() { var d = canvas.toDataURL('image/png'); this.href = d; }; d.addEventListener('click', myCanvas, false);

89 Views
If the content overflows, the workaround with overflowX property to solve the left/ right edge issues and set a scroll. Adding a scroll allows visitors to easily read the entire content.ExampleYou can try to run the following code to learn what is to be done with the left/ right edges of the content on overflow with JavaScript −Live Demo #box { width: 350px; height: 150px; background-color: orange; ... Read More

244 Views
If the content renders outside the element box, use the overflow property to add a scroll. This will ease visitors in reading the entire content.ExampleYou can try to run the following code to learn how to work with overflow property in JavaScript −Live Demo #box { width: 450px; height: 150px; background-color: orange; border: 3px solid red; margin-left: 20px; ... Read More

242 Views
To set the outline style, use the outlineStyle property. The outline can be solid, dotted, dashed, etc.ExampleYou can try to run the following code to set the style of the outline around an element with JavaScript −Live Demo #box { width: 450px; background-color: orange; border: 3px solid red; margin-left: 20px; } ... Read More

145 Views
To set the outline width, use the outlineWidth property. You can try to run the following code to set the width of the outline around an element with JavaScript −ExampleLive Demo #box { width: 450px; background-color: orange; border: 3px solid red; margin-left: 20px; } Click below to add Outline Width. ... Read More

152 Views
To set the outline color, use the outlineColor property. You can try to run the following code to set the color of the outline around an element with JavaScript:ExampleLive Demo #box { width: 450px; background-color: orange; border: 3px solid red; } Click below to add Outline Color. This ... Read More

206 Views
To offset an outline, use the outlineOffsetproperty. It allows you to draw the outline beyond the border edge. You can try to run the following code to offset an outline and draw it beyond the border edge with JavaScript. Example Live Demo #box { width: 450px; background-color: orange; ... Read More

153 Views
To set outline properties, use the outline property. It allows you to set the color, style, and offset of the outline.ExampleYou can try to run the following code to set all the outline properties in one declaration with JavaScript −Live Demo #box { width: 450px; background-color: orange; border: 3px solid red; } Click below to add ... Read More

766 Views
Use the opacity property in JavaScript to set the opacity level. You can try to run the following code to set the opacity level for an element with JavaScript −ExampleLive Demo #box { width: 450px; background-color: gray; } Click below to set Opacity. Set Opacity This is a div. This is a ... Read More

1K+ Views
Use the minWidth property in JavaScript to set the minimum width. You can try to run the following code to set the minimum width of an element with JavaScript −ExampleLive Demo #box { width: 50%; background-color: gray; } Click below to set Minimum width. Min Width This is a div. This ... Read More