- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- 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 8894 Articles for Front End Technology
![AmitDiwan](https://www.tutorialspoint.com/assets/profiles/123055/profile/60_187394-1565938756.jpg)
21K+ Views
We can create HTML tables with fixed header on scroll using CSS. It helps to increase readability as user doesn't have to scroll everytime to check the table header. In this article, we will learn and understand two different approaches for HTML tables with fixed header on scroll in CSS. We have a table inside a div element with class name as container. Our task is to fix HTML table header on scroll using CSS. Approaches for HTML Tables with Fixed Header on Scroll Here is a list of approaches for HTML tables with fixed header on scroll in CSS ... Read More
![AmitDiwan](https://www.tutorialspoint.com/assets/profiles/123055/profile/60_187394-1565938756.jpg)
2K+ Views
Using the CSS :not() pseudo-class, we can refine our styling by selecting those elements which do not have a specific value or does not match a selector. Select Elements not Having a Child Selector To select elements not having a child selector, use the :not pseudo-class in CSS. Here, we have a child selector. The CSS child selector is used to select all the child elements with a particular parent element. It selects all the elements that are children of i.e. div>p But we have selected elements not having this div>p − p:not(div>p) { ... Read More
![AmitDiwan](https://www.tutorialspoint.com/assets/profiles/123055/profile/60_187394-1565938756.jpg)
85 Views
To help developers customize their websites with a mix of JavaScript and CSS, new CSS properties have been developed and now support popular browsers. Some of these are listed below −focus-withinIt aims to solve focus-accessibility within elementsscroll-snapThis enables native scroll and deceleration@media(prefers-*)Helps set both UI and UX of page according to device preferences of the user, thereby, allowing higher level of personalization.* can denote light-level, forced-colors, color-scheme, contrast, reduced-motion and reduced-transparencyposition: stickyTo keep UI within the viewport.logical properties for having a standard layoutAllows us to have dynamic directional spacing within and around the elements.gap propertyThis property is now available for ... Read More
![AmitDiwan](https://www.tutorialspoint.com/assets/profiles/123055/profile/60_187394-1565938756.jpg)
718 Views
We can change the output of scrolling a webpage’s boundary area using the CSS overscroll-behavior property. Through this, we can disable Pull-to-Refresh on browsers. Syntax The syntax of CSS overscroll-behavior property is as follows − Selector { overscroll-behavior: /*value*/ } The Overscroll-behavior The following example illustrate CSS overscroll-behavior property. It sets what a web browser does after reaching the boundary of a scrolling area. Here, we have set the overflow-behavior-y for the div to set the web browser's behavior when the vertical boundary of a scrolling area is reached. The value contain is set for ... Read More
![AmitDiwan](https://www.tutorialspoint.com/assets/profiles/123055/profile/60_187394-1565938756.jpg)
123 Views
ProblemSuppose we have a S, str. which is an infinite wraparound string of the string −"abcdefghijklmnopqrstuvwxyz".Therefore, S will look like this −"...zabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcd....".We are required to write a JavaScript function that takes in str, let’s call that string str, as the only argument.Our function should find out how many unique non-empty substrings of str are present in S.Our function should finally return the number of different non-empty substrings of str in the string S.For example, if the input to the function is −const str = "zab";Then the output should be −const output = 6;Output ExplanationThere are six substrings "z", "a", "b", ... Read More
![AmitDiwan](https://www.tutorialspoint.com/assets/profiles/123055/profile/60_187394-1565938756.jpg)
173 Views
Problemconst random7 = () => Math.ceil(Math.random() * 7);Suppose we have the above fat arrow function. This function yields a random number between 0 (exclusive) and 7 (inclusive) everytime we make a call to it.We are required to write a similar random10() JavaScript function that takes no argument and makes no use of the JavaScript library or any third party library. And only making use of this random7() function, our function should return random number between 0 (exclusive) and 10(inclusive).ExampleThe code for this will be − Live Democonst random7 = () => Math.ceil(Math.random() * 7); const random10 = () => { ... Read More
![AmitDiwan](https://www.tutorialspoint.com/assets/profiles/123055/profile/60_187394-1565938756.jpg)
346 Views
Convex PolygonA convex polygon is defined as a polygon with all its interior angles less than 180°.ProblemWe are required to write a JavaScript function that takes in an array of coordinates, basically the array will be an array of arrays each subarray containing exactly two numbers, specifying a point on a 2-D plane.Our function should determine whether the polygon formed by these points is a convex polygon or not. If yes, the function should return true, false otherwise.For example, if the input to the function is −const arr = [[0, 0], [0, 1], [1, 1], [1, 0]];Then the output should be ... Read More
![AmitDiwan](https://www.tutorialspoint.com/assets/profiles/123055/profile/60_187394-1565938756.jpg)
924 Views
ProblemWe are required to write a JavaScript function that takes in a string of characters, str, as the only argument. Our function should encode the input string and compare its size with the original string and return the string which is smaller in size.The rule to encode a particular string is −n[s], where the s inside the square brackets is being repeated exactly k times.For instance, ddd can be encoded to 3[d] but 3[d] has a length of 4 whereas ddd is only 3 characters long so our function should eventually return ddd.For example, if the input to the function ... Read More
![AmitDiwan](https://www.tutorialspoint.com/assets/profiles/123055/profile/60_187394-1565938756.jpg)
149 Views
ProblemWe are required to write a JavaScript function that takes in an array of strings, arr, formed using 0 and 1 only as the first argument.The function takes two numbers as the second and third argument, m and respectively. The task of our function is to find how many strings from the array arr can be formed using at most m 0s and n 1s.For example, if the input to the function is −const arr = ["10", "0001", "111001", "1", "0"]; const m = 5, n = 3;Then the output should be −const output = 4;Output Explanation:There are in total ... Read More
![AmitDiwan](https://www.tutorialspoint.com/assets/profiles/123055/profile/60_187394-1565938756.jpg)
692 Views
MedianMedian in mathematics, median is the middle value in an ordered(sorted) integer list.If the size of the list is even, and there is no middle value. Median is the mean (average) of the two middle values.ProblemWe are required to write a JavaScript function that takes in an array of Integers, arr, as the first argument and a number num (num { while (l < r) { const mid = Math.floor((l + r) / 2); if (arr[mid] < target) l = mid + 1; else if (arr[mid] > target) r ... Read More