Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

css in console.log

console.log("%cStop!", "font: 50px sans-serif; font-weight:bold; color:red; -webkit-text-stroke:1px black;");
Comment

css customize console.log

// Rainbow Giant Styled Text
const style = 'font-weight: bold; font-size: 50px;color: red; text-shadow: 3px 3px 0 rgb(217,31,38) , 6px 6px 0 rgb(226,91,14) , 9px 9px 0 rgb(245,221,8) , 12px 12px 0 rgb(5,148,68) , 15px 15px 0 rgb(2,135,206) , 18px 18px 0 rgb(4,77,145) , 21px 21px 0 rgb(42,21,113)';

console.log('%c Rainbowww!', style);
Comment

Console.log CSS styling


//example 1: (Default "STOP" you see when opening the console)
console.log(
        "%cStop!",
        "color:red;font-family:system-ui;font-size:4rem;-webkit-text-stroke: 1px black;font-weight:bold"
      );
//example 2:
console.log("%c" + someVariable, 'color:blue;border:2px solid red');
//example 3:
console.log("%cWord 1 %cWord2  ", 'color:red;border:2px solid blue;background:green','color:blue;border:2px solid red');
Comment

PREVIOUS NEXT
Code Example
Javascript :: ansi encoding "vscode" 
Javascript :: play background music in html jasvascript 
Javascript :: count items in div jquery 
Javascript :: ngfor on keys of a dictionary angular 
Javascript :: node downgrade windows 
Javascript :: javascript anagram check 
Javascript :: how to get the first character of a string in javascript 
Javascript :: sequelize undo last migration 
Javascript :: How to find the max id in an array of objects in JavaScript 
Javascript :: gradlew clean in react native 
Javascript :: javascript stop setinterval 
Javascript :: newtonsoft json change property name 
Javascript :: vue npx 
Javascript :: Codewars Beginner Series #3 Sum of Numbers 
Javascript :: how to find prime numbers in an array in javascript 
Javascript :: javascript do arrays intersect 
Javascript :: javascript base64 encode string 
Javascript :: insertafter jquery 
Javascript :: js random string 
Javascript :: js preventdefault 
Javascript :: npm react router dom@5 
Javascript :: change favicon with javascript 
Javascript :: how to remove last char from string in javascript 
Javascript :: for elem in list javascript 
Javascript :: click element via javascript chrome inspector console 
Javascript :: count the total number of digits of a number in javascript 
Javascript :: NullInjectorError: R3InjectorError(DashboardModule)[DatabaseService - DatabaseService - HttpClient 
Javascript :: center image jsx css 
Javascript :: performance.now nodejs example 
Javascript :: createstore is deprecated 
ADD CONTENT
Topic
Content
Source link
Name
8+4 =