DEV Community

Amit Prajapati
Amit Prajapati

Posted on

1

Preview how CSS border-radius values affect an element

const container = document.querySelector('#container').style;
const left = document.querySelector('#left');
const tops = document.querySelector('#top');
const right = document.querySelector('#right');
const buttom = document.querySelector('#buttom');
window.addEventListener('click',(e)=>{
  container.borderLeft = `2px solid red`; 
  container.borderTopLeftRadius = Number(left.value)+'px'; 
})
window.addEventListener('click',(e)=>{
  container.borderRight = `2px solid #e91e63`; 
  container.borderTopRightRadius = Number(tops.value)+'px'; 
})
window.addEventListener('click',(e)=>{
  container.borderTop = `2px solid #673ab7`; 
  container.borderBottomLeftRadius = Number(right.value)+'px'; 
})
window.addEventListener('click',(e)=>{
  container.borderBottom = `2px solid #009688`;

  container.borderBottomRightRadius = Number(buttom.value)+'px'; 
})
Enter fullscreen mode Exit fullscreen mode

*Image description
*

Qodo Takeover

Introducing Qodo Gen 1.0: Transform Your Workflow with Agentic AI

While many AI coding tools operate as simple command-response systems, Qodo Gen 1.0 represents the next generation: autonomous, multi-step problem-solving agents that work alongside you.

Read full post →

Top comments (0)

Sentry image

See why 4M developers consider Sentry, “not bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay