Inheritance is a bit more complicated than that.
Your definition is closer to what the Template Method pattern [1] is, rather than inheritance in general.
Keep in mind also that neither inheritance itself nor the Template Method pattern guarantee encapsulation.
What is inheritance but a way to encapsulate data and methods in a way where you only need to override a subset of very specific methods and/or data to specialize an implementation?