Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
4.9k views
in Technique[技术] by (71.8m points)

html - search bar ignoring radius from css and keeping sharp corners

I am building an android application using angular nativescript and i want my application to have a search bar with round corners. I wrote this code in my html:

<SearchBar class="search"></SearchBar>

And added to the css this:

.search{
    border-radius: 30;
}

But the search bar keeps its corners with no radius as seen in the picture. What should i do?

enter image description here


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Assign the unit of the property value:

.search{
    border-radius: 30px;
}

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...